Packages > @fluid-experimental/odsp-client > IOdspTokenProvider
IOdspTokenProvider Interface
Abstracts the token fetching mechanism for a hosting application. The hosting application is responsible for providing an implementation.
WARNING: This API is provided as a beta preview and may change without notice. Use at your own risk.
Signature
export interface IOdspTokenProvider
Methods
Method | Alerts | Return Type | Description |
---|---|---|---|
fetchStorageToken(siteUrl, refresh) |
BETA
|
Promise<TokenResponse> | Fetches the storage token from host. |
fetchWebsocketToken(siteUrl, refresh) |
BETA
|
Promise<TokenResponse> | Fetches the orderer token from host. |
Method Details
fetchStorageToken (BETA)
Fetches the storage token from host.
WARNING: This API is provided as a beta preview and may change without notice. Use at your own risk.
Signature
fetchStorageToken(siteUrl: string, refresh: boolean): Promise<TokenResponse>;
Parameters
Parameter | Type | Description |
---|---|---|
siteUrl | string | Site url representing ODSP resource location. It points to the specific SharePoint site where you can store and access the containers you create. |
refresh | boolean |
Optional flag indicating whether token fetch must bypass local cache. This likely indicates that some previous request failed authorization due to an expired token, and so a fresh token is required.
Default: |
Returns
Return type: Promise<TokenResponse >
fetchWebsocketToken (BETA)
Fetches the orderer token from host.
WARNING: This API is provided as a beta preview and may change without notice. Use at your own risk.
Signature
fetchWebsocketToken(siteUrl: string, refresh: boolean): Promise<TokenResponse>;
Parameters
Parameter | Type | Description |
---|---|---|
siteUrl | string | Site url representing ODSP resource location. It points to the specific SharePoint site where you can store and access the containers you create. |
refresh | boolean |
Optional flag indicating whether token fetch must bypass local cache. This likely indicates that some previous request failed authorization due to an expired token, and so a fresh token is required.
Default: |
Returns
Return type: Promise<TokenResponse >