ContextDeferredAuthProvider
Home > @gooddata/sdk-backend-bear > ContextDeferredAuthProvider
ContextDeferredAuthProvider class
This implementation of authentication provider defers the responsibility for performing authentication to the context in which it exists.
Signature:
export declare class ContextDeferredAuthProvider extends BearAuthProviderBase implements IAuthenticationProvider
Extends: BearAuthProviderBase
Implements: IAuthenticationProvider
Remarks
In other words it expects that the application will take care of driving the authentication and creating a correct session in which the Bear backend can make authenticated calls.
You may use the provider's ability to use passed NotAuthenticatedHandler
function. This will be called every time a NotAuthenticated error is raised by the backend. Your application can pass a custom handler of this event - typically something that will start driving the authentication from a single place.
Note: the not authenticated handler MAY be called many times in succession so you may want to wrap it in a call guard or in a debounce.
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(notAuthenticatedHandler) | Constructs a new instance of the ContextDeferredAuthProvider class |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
onNotAuthenticated | (context: IAuthenticationContext, error: NotAuthenticated) => void |
Methods
Method | Modifiers | Description |
---|---|---|
authenticate(context) |