@wildix/auth-utils > WmsApiTokenProvider
WmsApiTokenProvider class
The WmsApiTokenProvider
class is a token provider implementation that facilitates the retrieval of access tokens for the WMS Server.
Example Usage:
const clientId = 'yourClientId';
const clientSecret = 'yourClientSecret';
const tokenProvider = new WmsApiTokenProvider(new ServiceTokenProvider(clientId, clientSecret), 'admin', 'crm-test');
try {
const accessToken = await tokenProvider.token();
console.log('Access Token:', accessToken);
} catch (error) {
console.error('Error retrieving access token:', error);
}
The implementation encapsulates the logic for obtaining and caching access tokens securely, abstracting away the details of the authentication process.
Signature:
export declare class WmsApiTokenProvider implements TokenProvider
Implements: TokenProvider
Constructors
Constructor | Modifiers | Description |
---|---|---|
Constructs a new instance of the |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
string | undefined | |||
number | undefined | |||
string | |||
string | |||
TokenProvider | |||
string |
Methods
Method | Modifiers | Description |
---|---|---|