Package version:

Interface GetTokenOptions

Defines options for TokenCredential.getToken.

interface GetTokenOptions {
    abortSignal?: any;
    claims?: string;
    enableCae?: boolean;
    proofOfPossessionOptions?: {
        nonce: string;
        resourceRequestMethod: HttpMethods;
        resourceRequestUrl: string;
    };
    requestOptions?: {
        timeout?: number;
    };
    tenantId?: string;
    tracingOptions?: {
        tracingContext?: TracingContext;
    };
}

Properties

abortSignal?: any

The signal which can be used to abort requests.

claims?: string

Claim details to perform the Continuous Access Evaluation authentication flow

enableCae?: boolean

Indicates whether to enable the Continuous Access Evaluation authentication flow

proofOfPossessionOptions?: {
    nonce: string;
    resourceRequestMethod: HttpMethods;
    resourceRequestUrl: string;
}

Options for Proof of Possession token requests

Type declaration

  • nonce: string

    The nonce value required for PoP token requests. This is typically retrieved from the WWW-Authenticate header of a 401 challenge response. This is used in combination with resourceRequestUrl and resourceRequestMethod to generate the PoP token.

  • resourceRequestMethod: HttpMethods

    The HTTP method of the request. This is used in combination with resourceRequestUrl and nonce to generate the PoP token.

  • resourceRequestUrl: string

    The URL of the request. This is used in combination with resourceRequestMethod and nonce to generate the PoP token.

requestOptions?: {
    timeout?: number;
}

Options used when creating and sending HTTP requests for this operation.

Type declaration

  • Optionaltimeout?: number

    The number of milliseconds a request can take before automatically being terminated.

tenantId?: string

Allows specifying a tenantId. Useful to handle challenges that provide tenant Id hints.

tracingOptions?: {
    tracingContext?: TracingContext;
}

Options used when tracing is enabled.

Type declaration

  • OptionaltracingContext?: TracingContext

    Tracing Context for the current request.