Skip to main content

TokenFetchOptions Interface

Represents access token fetch options

This API is provided for existing users, but is not recommended for new users.

To use, import via @fluidframework/odsp-driver-definitions/legacy.

For more information about our API support guarantees, see here.

Signature

export interface TokenFetchOptions

Properties

Property Alerts Modifiers Type Description
claims Alpha optional string Claims that have to be passed with token fetch request. These can be used to specify additional information that must be passed to token authority.
refresh Alpha boolean Value indicating whether fresh token has to be returned. If false then it is okay to return cached unexpired token if available.
request Alpha optional, readonly { url: string; method: "GET" | "POST" | "PATCH" | "DELETE" | "PUT"; } Request that will be made using the fetched token. - url: full request url, including query params - method: method type Request info may be encoded into the returned token that the receiver can use to validate that caller is allowed to make specific call.
tenantId Alpha optional string Tenant id of authority that must be handling token fetch. If it is not specified then it is up to token fetching logic to determine which tenant authority to use to issue access token.

Property Details

claims

Claims that have to be passed with token fetch request. These can be used to specify additional information that must be passed to token authority.

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/odsp-driver-definitions/alpha.

For more information about our API support guarantees, see here.

Signature

claims?: string;

Type: string

refresh

Value indicating whether fresh token has to be returned. If false then it is okay to return cached unexpired token if available.

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/odsp-driver-definitions/alpha.

For more information about our API support guarantees, see here.

Signature

refresh: boolean;

Type: boolean

request

Request that will be made using the fetched token. - url: full request url, including query params - method: method type Request info may be encoded into the returned token that the receiver can use to validate that caller is allowed to make specific call.

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/odsp-driver-definitions/alpha.

For more information about our API support guarantees, see here.

Signature

readonly request?: {
url: string;
method: "GET" | "POST" | "PATCH" | "DELETE" | "PUT";
};

Type: { url: string; method: "GET" | "POST" | "PATCH" | "DELETE" | "PUT"; }

tenantId

Tenant id of authority that must be handling token fetch. If it is not specified then it is up to token fetching logic to determine which tenant authority to use to issue access token.

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/odsp-driver-definitions/alpha.

For more information about our API support guarantees, see here.

Signature

tenantId?: string;

Type: string