<PackageReference Include="Azure.Core" Version="1.48.0" />

TokenRequestContext

public struct TokenRequestContext
Contains the details of an authentication token request.
public string Claims { get; }

Additional claims to be included in the token. See https://openid.net/specs/openid-connect-core-1_0-final.html#ClaimsParameter for more information on format and content.

public bool IsCaeEnabled { get; }

Indicates whether to enable Continuous Access Evaluation (CAE) for the requested token.

public bool IsProofOfPossessionEnabled { get; }

Indicates whether to enable Proof of Possession (PoP) for the requested token.

public string ParentRequestId { get; }

The ClientRequestId of the request requiring a token for authentication, if applicable.

public string ProofOfPossessionNonce { get; }

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 ResourceRequestUri and ResourceRequestMethod to generate the PoP token.

public string ResourceRequestMethod { get; }

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

public Uri ResourceRequestUri { get; }

The URI of the request. This is used in combination with ResourceRequestMethod and ProofOfPossessionNonce to generate the PoP token.

public string[] Scopes { get; }

The scopes required for the token.

public string TenantId { get; }

The tenantId to be included in the token request.

public TokenRequestContext(string[] scopes, string parentRequestId)

Creates a new TokenRequest with the specified scopes.

public TokenRequestContext(string[] scopes, string parentRequestId, string claims)

Creates a new TokenRequest with the specified scopes.

public TokenRequestContext(string[] scopes, string parentRequestId, string claims, string tenantId)

Creates a new TokenRequest with the specified scopes.

public TokenRequestContext(string[] scopes, string parentRequestId, string claims, string tenantId, bool isCaeEnabled)

Creates a new TokenRequest with the specified scopes.

public TokenRequestContext(string[] scopes, string parentRequestId = null, string claims = null, string tenantId = null, bool isCaeEnabled = false, bool isProofOfPossessionEnabled = false, string proofOfPossessionNonce = null, Uri requestUri = null, string requestMethod = null)

Creates a new TokenRequest with the specified scopes.