TigerTokenAuthProvider
This implementation of authentication provider uses an API Token as bearer of authentication.
export declare class TigerTokenAuthProvider extends TigerAuthProviderBase
Extends: TigerAuthProviderBase
Remarks
You can provide token at construction time and it will be passed on all calls to Tiger APIs
This is a go-to authentication provider for command-line applications. While nothing stops you from using this provider in UI applications, keep in mind that this is discouraged due to security holes it leads to; having the token hardcoded in a UI application means anyone can find it and use it for themselves.
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
(context: IAuthenticationContext, error: NotAuthenticated) => void | |||
(apiToken: string) => void |
Methods
Method | Modifiers | Description |
|---|---|---|
Property details
TigerTokenAuthProvider.onNotAuthenticatedproperty
onNotAuthenticated: (context: IAuthenticationContext, error: NotAuthenticated) => void;
TigerTokenAuthProvider.updateApiTokenproperty
updateApiToken: (apiToken: string) => void;
Method details
TigerTokenAuthProvider.authenticate()method
authenticate(context: IAuthenticationContext): Promise<IAuthenticatedPrincipal>;
Parameters
Parameter | Type | Description |
|---|---|---|
context |
Returns
Promise<IAuthenticatedPrincipal>
TigerTokenAuthProvider.initializeClient()method
initializeClient(client: ITigerClient): void;
Parameters
Parameter | Type | Description |
|---|---|---|
client | ITigerClient |
Returns
void