Skip to main content
Version: v1

OdspTokenManager Class

Signature

export declare class OdspTokenManager

Constructors

Constructor Description
(constructor)(tokenCache) Constructs a new instance of the OdspTokenManager class

Methods

Method Return Type Description
getOdspTokens(server, clientConfig, tokenConfig, forceRefresh, forceReauth) Promise<IOdspTokens>
getPushTokens(server, clientConfig, tokenConfig, forceRefresh, forceReauth) Promise<IOdspTokens>
updateTokensCache(key, value) Promise<void>

Constructor Details

(constructor)

Constructs a new instance of the OdspTokenManager class

Signature

constructor(tokenCache?: IAsyncCache<IOdspTokenManagerCacheKey, IOdspTokens> | undefined);

Parameters

Parameter Modifiers Type Description
tokenCache optional IAsyncCache<IOdspTokenManagerCacheKey, IOdspTokens> | undefined

Method Details

getOdspTokens

Signature

getOdspTokens(server: string, clientConfig: IClientConfig, tokenConfig: OdspTokenConfig, forceRefresh?: boolean, forceReauth?: boolean): Promise<IOdspTokens>;

Parameters

Parameter Modifiers Type Description
server string
clientConfig IClientConfig
tokenConfig OdspTokenConfig
forceRefresh optional boolean
forceReauth optional boolean

Returns

Return type: Promise<IOdspTokens>

getPushTokens

Signature

getPushTokens(server: string, clientConfig: IClientConfig, tokenConfig: OdspTokenConfig, forceRefresh?: boolean, forceReauth?: boolean): Promise<IOdspTokens>;

Parameters

Parameter Modifiers Type Description
server string
clientConfig IClientConfig
tokenConfig OdspTokenConfig
forceRefresh optional boolean
forceReauth optional boolean

Returns

Return type: Promise<IOdspTokens>

updateTokensCache

Signature

updateTokensCache(key: IOdspTokenManagerCacheKey, value: IOdspTokens): Promise<void>;

Parameters

Parameter Type Description
key IOdspTokenManagerCacheKey
value IOdspTokens

Returns

Return type: Promise<void>