This implementation of authentication provider defers the responsibility for performing authentication to the context in which it exists.
export declare class ContextDeferredAuthProvider extends BearAuthProviderBase implements IAuthenticationProvider
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.
|(constructor)(notAuthenticatedHandler)||Constructs a new instance of the |
|onNotAuthenticated||(context: IAuthenticationContext, error: NotAuthenticated) => void|