JsonWebTokenPayloadExtensions Class
The OpenID Connect and OAuth claims of a JSON Web Token, read and written as properties of its payload.
public static class JsonWebTokenPayloadExtensionsInheritance System.Object → JsonWebTokenPayloadExtensions
Remarks
JsonWebTokenPayload carries the claims JWT itself defines (RFC 7519) and the confirmation of RFC 7800; the claims the protocols built on it give meaning to live here, so a JWT library carries no knowledge of them.
Methods
JsonWebTokenPayloadExtensions.get_AccessTokenHash(JsonWebTokenPayload) Method
A digest binding this ID token to the access token issued alongside it, per OpenID Connect Core section 3.1.3.6.
public static string? get_AccessTokenHash(Abblix.Jwt.JsonWebTokenPayload payload);Parameters
payload JsonWebTokenPayload
Returns
Remarks
Read by a relying party to confirm that the access token it holds is the one this ID token was issued with. Without that binding an attacker who can substitute an access token gets an identity assertion about one user paired with authority belonging to another.
JsonWebTokenPayloadExtensions.get_AuthContextClassRef(JsonWebTokenPayload) Method
Represents the Authentication Context Class Reference (ACR) indicating the authentication context achieved during authentication.
public static string? get_AuthContextClassRef(Abblix.Jwt.JsonWebTokenPayload payload);Parameters
payload JsonWebTokenPayload
Returns
Remarks
In federated and multi-tenant environments, the acr claim helps assert that the user was authenticated
under a specific assurance level (e.g., "urn:openbanking:psd2:sca" or "loa3").
This is particularly important for applications that integrate with external identity providers, regulatory domains (such as finance or healthcare), or environments where different tenants require varying levels of authentication rigor. The ACR value enables relying parties to make access decisions based on agreed-upon trust frameworks and security profiles.
JsonWebTokenPayloadExtensions.get_AuthenticationMethodReferences(JsonWebTokenPayload) Method
A list of authentication methods used to authenticate the subject, represented as Authentication Method Reference (AMR) values.
public static System.Collections.Generic.IEnumerable<string>? get_AuthenticationMethodReferences(Abblix.Jwt.JsonWebTokenPayload payload);Parameters
payload JsonWebTokenPayload
Returns
System.Collections.Generic.IEnumerable<System.String>
Remarks
In multi-tenant and federated identity systems, this claim helps relying parties understand the authentication strength applied to a user session.
Each value in the list corresponds to a specific method used during authentication,
such as "pwd" (password), "mfa" (multi-factor authentication), "otp" (one-time password),
or "fido" (FIDO-based authentication).
These values support policy enforcement at the tenant level, allowing services to require particular authentication methods (e.g., tenants enforcing MFA) or to provide differentiated access based on authentication robustness.
JsonWebTokenPayloadExtensions.get_AuthenticationTime(JsonWebTokenPayload) Method
Represents the time when the authentication occurred, facilitating checks against token freshness and replay attacks.
public static System.Nullable<System.DateTimeOffset> get_AuthenticationTime(Abblix.Jwt.JsonWebTokenPayload payload);Parameters
payload JsonWebTokenPayload
Returns
System.Nullable<System.DateTimeOffset>
Remarks
Storing the authentication time is critical for applications requiring a high level of assurance regarding the moment a user was authenticated, allowing for precise control over session validity and user authentication status.
JsonWebTokenPayloadExtensions.get_AuthorizationDetails(JsonWebTokenPayload) Method
The RFC 9396 authorization_details claim as a sequence of typed wrappers over
the underlying System.Text.Json.Nodes.JsonArray stored at Json[authorization_details].
Each wrapper shares its System.Text.Json.Nodes.JsonNode reference with the corresponding array
element - read-through is byte-exact, and property setters on a wrapper mutate the
underlying claim in place. Assigning a new sequence rebuilds the raw array via
ToRawJsonArray(this IEnumerable<AuthorizationDetail>), deep-cloning each entry's
Json to detach parent ownership; assigning null
removes the claim. For direct raw access bypass this accessor and use the
Json indexer at IanaClaimTypes.AuthorizationDetails.
public static System.Collections.Generic.IEnumerable<Abblix.Oidc.AuthorizationDetail>? get_AuthorizationDetails(Abblix.Jwt.JsonWebTokenPayload payload);Parameters
payload JsonWebTokenPayload
Returns
System.Collections.Generic.IEnumerable<AuthorizationDetail>
JsonWebTokenPayloadExtensions.get_AuthorizedParty(JsonWebTokenPayload) Method
The authorized party (azp): the party the token was issued to. OpenID Connect Core 1.0 section 2 defines it in one sentence - "OPTIONAL. Authorized party - the party to which the ID Token was issued. If present, it MUST contain the OAuth 2.0 Client ID of this party." So the claim is optional, and the only obligation attaches to its value.
public static string? get_AuthorizedParty(Abblix.Jwt.JsonWebTokenPayload payload);Parameters
payload JsonWebTokenPayload
Returns
Remarks
This described the claim as mandated, and as keyed to the issuer, until 2026-07-20. Both were wrong, and the second inverts what the claim is for: azp names the recipient, not the sender. The conditions the old text carried - a single audience differing from something, or more than one audience - come from wording that errata set 2 replaced. A recipient's duty is correspondingly weak: section 3.1.3.7 step 4 says a client using extensions that produce azp "SHOULD validate the azp value as specified by those extensions", and step 5 that this "MAY include that when an azp Claim is present, the Client SHOULD verify that its client_id is the Claim Value". Nothing here is a MUST, and a validator that rejects on a missing azp will refuse conformant issuers.
JsonWebTokenPayloadExtensions.get_ClientId(JsonWebTokenPayload) Method
The client ID for which the JWT was issued, identifying the client application in OAuth 2.0 and OpenID Connect flows.
public static string? get_ClientId(Abblix.Jwt.JsonWebTokenPayload payload);Parameters
payload JsonWebTokenPayload
Returns
Remarks
This property is crucial in scenarios where the JWT is used to convey or assert the identity of a client application to the authorization server or resource server.
JsonWebTokenPayloadExtensions.get_CodeHash(JsonWebTokenPayload) Method
A digest binding this ID token to the authorization code issued alongside it, per OpenID Connect Core section 3.3.2.11.
public static string? get_CodeHash(Abblix.Jwt.JsonWebTokenPayload payload);Parameters
payload JsonWebTokenPayload
Returns
Remarks
Present in the hybrid flow, where the ID token arrives through the front channel before the code is redeemed. It is what lets the relying party detect a code swapped in transit, since the swapped code would not match the digest in a token it cannot forge.
JsonWebTokenPayloadExtensions.get_DPoPAccessTokenHash(JsonWebTokenPayload) Method
The access-token hash bound by a DPoP proof when one accompanies an access token
(RFC 9449 section 4.2 ath): Base64Url(SHA-256(access_token)).
public static string? get_DPoPAccessTokenHash(Abblix.Jwt.JsonWebTokenPayload payload);Parameters
payload JsonWebTokenPayload
Returns
JsonWebTokenPayloadExtensions.get_DPoPHttpMethod(JsonWebTokenPayload) Method
The HTTP method bound by a DPoP proof (RFC 9449 section 4.2 htm). Compared
byte-exact against the current request method on the server side.
public static string? get_DPoPHttpMethod(Abblix.Jwt.JsonWebTokenPayload payload);Parameters
payload JsonWebTokenPayload
Returns
JsonWebTokenPayloadExtensions.get_DPoPHttpUri(JsonWebTokenPayload) Method
The HTTP URI bound by a DPoP proof (RFC 9449 section 4.2 htu), or null when the claim is absent or
is not an absolute URI. A caller telling the two apart looks for the claim itself.
public static System.Uri? get_DPoPHttpUri(Abblix.Jwt.JsonWebTokenPayload payload);Parameters
payload JsonWebTokenPayload
Returns
JsonWebTokenPayloadExtensions.get_Email(JsonWebTokenPayload) Method
The email address of the subject.
public static string? get_Email(Abblix.Jwt.JsonWebTokenPayload payload);Parameters
payload JsonWebTokenPayload
Returns
Remarks
When the subject uses external authentication (Google, Microsoft, etc.) or authenticates via email verification, this property contains the exact email used during authentication, ensuring the email claim in ID tokens reflects the authentication method rather than the primary email from the user's profile.
JsonWebTokenPayloadExtensions.get_EmailVerified(JsonWebTokenPayload) Method
Indicates whether the email address has been verified.
public static System.Nullable<bool> get_EmailVerified(Abblix.Jwt.JsonWebTokenPayload payload);Parameters
payload JsonWebTokenPayload
Returns
System.Nullable<System.Boolean>
Remarks
For external providers that verify emails or when email verification has been completed through challenge flows, this value is set to true. This is used in the email_verified claim in ID tokens.
JsonWebTokenPayloadExtensions.get_GrantId(JsonWebTokenPayload) Method
Identifies the refresh token family whose authority this token exercises, binding it to the lineage of every token derived from the same grant. A first-issued refresh token starts a new grant; each rotation carries the value forward, so a detected replay can revoke the whole family in one registry write (RFC 9700 Section 4.14.2).
public static string? get_GrantId(Abblix.Jwt.JsonWebTokenPayload payload);Parameters
payload JsonWebTokenPayload
Returns
Remarks
Present on an access or refresh token minted inside a family - the one the grant it was issued under carried, or the one started for a request issuing a refresh token. Absent (null) on every other token, an ID token included, which leaves the family cascade in the token-status validator inert for it.
JsonWebTokenPayloadExtensions.get_IdentityProvider(JsonWebTokenPayload) Method
Identifies the identity provider that authenticated the end user, useful in federated identity scenarios.
public static string? get_IdentityProvider(Abblix.Jwt.JsonWebTokenPayload payload);Parameters
payload JsonWebTokenPayload
Returns
Remarks
This claim is particularly relevant in systems that support multiple identity providers, helping to trace the origin of the authentication and ensuring that the JWT can be validated appropriately.
JsonWebTokenPayloadExtensions.get_Nonce(JsonWebTokenPayload) Method
A value used to associate a client session with an ID token, mitigating replay attacks.
public static string? get_Nonce(Abblix.Jwt.JsonWebTokenPayload payload);Parameters
payload JsonWebTokenPayload
Returns
JsonWebTokenPayloadExtensions.get_Scope(JsonWebTokenPayload) Method
The scope of access granted by the JWT. Scope is typically a space-separated list of permissions or access levels and is not part of the standard JWT claims.
public static System.Collections.Generic.IEnumerable<string> get_Scope(Abblix.Jwt.JsonWebTokenPayload payload);Parameters
payload JsonWebTokenPayload
Returns
System.Collections.Generic.IEnumerable<System.String>
Remarks
The 'scope' claim is often used in OAuth 2.0 and OpenID Connect contexts to specify the extent of access granted by the token. Each value in the list represents a specific permission or access level granted to the token bearer. This property ensures that the scope is represented appropriately as either a single value or an array of values.
JsonWebTokenPayloadExtensions.get_SessionId(JsonWebTokenPayload) Method
The session ID associated with the JWT, typically used to manage session state across applications.
public static string? get_SessionId(Abblix.Jwt.JsonWebTokenPayload payload);Parameters
payload JsonWebTokenPayload
Returns
Remarks
The session ID can link the JWT to a specific session for the user, allowing for effective session management and security controls.
JsonWebTokenPayloadExtensions.set_AccessTokenHash(JsonWebTokenPayload, string) Method
A digest binding this ID token to the access token issued alongside it, per OpenID Connect Core section 3.1.3.6.
public static void set_AccessTokenHash(Abblix.Jwt.JsonWebTokenPayload payload, string? value);Parameters
payload JsonWebTokenPayload
value System.String
Remarks
Read by a relying party to confirm that the access token it holds is the one this ID token was issued with. Without that binding an attacker who can substitute an access token gets an identity assertion about one user paired with authority belonging to another.
JsonWebTokenPayloadExtensions.set_AuthContextClassRef(JsonWebTokenPayload, string) Method
Represents the Authentication Context Class Reference (ACR) indicating the authentication context achieved during authentication.
public static void set_AuthContextClassRef(Abblix.Jwt.JsonWebTokenPayload payload, string? value);Parameters
payload JsonWebTokenPayload
value System.String
Remarks
In federated and multi-tenant environments, the acr claim helps assert that the user was authenticated
under a specific assurance level (e.g., "urn:openbanking:psd2:sca" or "loa3").
This is particularly important for applications that integrate with external identity providers, regulatory domains (such as finance or healthcare), or environments where different tenants require varying levels of authentication rigor. The ACR value enables relying parties to make access decisions based on agreed-upon trust frameworks and security profiles.
JsonWebTokenPayloadExtensions.set_AuthenticationMethodReferences(JsonWebTokenPayload, IEnumerable<string>) Method
A list of authentication methods used to authenticate the subject, represented as Authentication Method Reference (AMR) values.
public static void set_AuthenticationMethodReferences(Abblix.Jwt.JsonWebTokenPayload payload, System.Collections.Generic.IEnumerable<string>? value);Parameters
payload JsonWebTokenPayload
value System.Collections.Generic.IEnumerable<System.String>
Remarks
In multi-tenant and federated identity systems, this claim helps relying parties understand the authentication strength applied to a user session.
Each value in the list corresponds to a specific method used during authentication,
such as "pwd" (password), "mfa" (multi-factor authentication), "otp" (one-time password),
or "fido" (FIDO-based authentication).
These values support policy enforcement at the tenant level, allowing services to require particular authentication methods (e.g., tenants enforcing MFA) or to provide differentiated access based on authentication robustness.
JsonWebTokenPayloadExtensions.set_AuthenticationTime(JsonWebTokenPayload, Nullable<DateTimeOffset>) Method
Represents the time when the authentication occurred, facilitating checks against token freshness and replay attacks.
public static void set_AuthenticationTime(Abblix.Jwt.JsonWebTokenPayload payload, System.Nullable<System.DateTimeOffset> value);Parameters
payload JsonWebTokenPayload
value System.Nullable<System.DateTimeOffset>
Remarks
Storing the authentication time is critical for applications requiring a high level of assurance regarding the moment a user was authenticated, allowing for precise control over session validity and user authentication status.
JsonWebTokenPayloadExtensions.set_AuthorizationDetails(JsonWebTokenPayload, IEnumerable<AuthorizationDetail>) Method
The RFC 9396 authorization_details claim as a sequence of typed wrappers over
the underlying System.Text.Json.Nodes.JsonArray stored at Json[authorization_details].
Each wrapper shares its System.Text.Json.Nodes.JsonNode reference with the corresponding array
element - read-through is byte-exact, and property setters on a wrapper mutate the
underlying claim in place. Assigning a new sequence rebuilds the raw array via
ToRawJsonArray(this IEnumerable<AuthorizationDetail>), deep-cloning each entry's
Json to detach parent ownership; assigning null
removes the claim. For direct raw access bypass this accessor and use the
Json indexer at IanaClaimTypes.AuthorizationDetails.
public static void set_AuthorizationDetails(Abblix.Jwt.JsonWebTokenPayload payload, System.Collections.Generic.IEnumerable<Abblix.Oidc.AuthorizationDetail>? value);Parameters
payload JsonWebTokenPayload
value System.Collections.Generic.IEnumerable<AuthorizationDetail>
JsonWebTokenPayloadExtensions.set_AuthorizedParty(JsonWebTokenPayload, string) Method
The authorized party (azp): the party the token was issued to. OpenID Connect Core 1.0 section 2 defines it in one sentence - "OPTIONAL. Authorized party - the party to which the ID Token was issued. If present, it MUST contain the OAuth 2.0 Client ID of this party." So the claim is optional, and the only obligation attaches to its value.
public static void set_AuthorizedParty(Abblix.Jwt.JsonWebTokenPayload payload, string? value);Parameters
payload JsonWebTokenPayload
value System.String
Remarks
This described the claim as mandated, and as keyed to the issuer, until 2026-07-20. Both were wrong, and the second inverts what the claim is for: azp names the recipient, not the sender. The conditions the old text carried - a single audience differing from something, or more than one audience - come from wording that errata set 2 replaced. A recipient's duty is correspondingly weak: section 3.1.3.7 step 4 says a client using extensions that produce azp "SHOULD validate the azp value as specified by those extensions", and step 5 that this "MAY include that when an azp Claim is present, the Client SHOULD verify that its client_id is the Claim Value". Nothing here is a MUST, and a validator that rejects on a missing azp will refuse conformant issuers.
JsonWebTokenPayloadExtensions.set_ClientId(JsonWebTokenPayload, string) Method
The client ID for which the JWT was issued, identifying the client application in OAuth 2.0 and OpenID Connect flows.
public static void set_ClientId(Abblix.Jwt.JsonWebTokenPayload payload, string? value);Parameters
payload JsonWebTokenPayload
value System.String
Remarks
This property is crucial in scenarios where the JWT is used to convey or assert the identity of a client application to the authorization server or resource server.
JsonWebTokenPayloadExtensions.set_CodeHash(JsonWebTokenPayload, string) Method
A digest binding this ID token to the authorization code issued alongside it, per OpenID Connect Core section 3.3.2.11.
public static void set_CodeHash(Abblix.Jwt.JsonWebTokenPayload payload, string? value);Parameters
payload JsonWebTokenPayload
value System.String
Remarks
Present in the hybrid flow, where the ID token arrives through the front channel before the code is redeemed. It is what lets the relying party detect a code swapped in transit, since the swapped code would not match the digest in a token it cannot forge.
JsonWebTokenPayloadExtensions.set_DPoPAccessTokenHash(JsonWebTokenPayload, string) Method
The access-token hash bound by a DPoP proof when one accompanies an access token
(RFC 9449 section 4.2 ath): Base64Url(SHA-256(access_token)).
public static void set_DPoPAccessTokenHash(Abblix.Jwt.JsonWebTokenPayload payload, string? value);Parameters
payload JsonWebTokenPayload
value System.String
JsonWebTokenPayloadExtensions.set_DPoPHttpMethod(JsonWebTokenPayload, string) Method
The HTTP method bound by a DPoP proof (RFC 9449 section 4.2 htm). Compared
byte-exact against the current request method on the server side.
public static void set_DPoPHttpMethod(Abblix.Jwt.JsonWebTokenPayload payload, string? value);Parameters
payload JsonWebTokenPayload
value System.String
JsonWebTokenPayloadExtensions.set_DPoPHttpUri(JsonWebTokenPayload, Uri) Method
The HTTP URI bound by a DPoP proof (RFC 9449 section 4.2 htu), or null when the claim is absent or
is not an absolute URI. A caller telling the two apart looks for the claim itself.
public static void set_DPoPHttpUri(Abblix.Jwt.JsonWebTokenPayload payload, System.Uri? value);Parameters
payload JsonWebTokenPayload
value System.Uri
JsonWebTokenPayloadExtensions.set_Email(JsonWebTokenPayload, string) Method
The email address of the subject.
public static void set_Email(Abblix.Jwt.JsonWebTokenPayload payload, string? value);Parameters
payload JsonWebTokenPayload
value System.String
Remarks
When the subject uses external authentication (Google, Microsoft, etc.) or authenticates via email verification, this property contains the exact email used during authentication, ensuring the email claim in ID tokens reflects the authentication method rather than the primary email from the user's profile.
JsonWebTokenPayloadExtensions.set_EmailVerified(JsonWebTokenPayload, Nullable<bool>) Method
Indicates whether the email address has been verified.
public static void set_EmailVerified(Abblix.Jwt.JsonWebTokenPayload payload, System.Nullable<bool> value);Parameters
payload JsonWebTokenPayload
value System.Nullable<System.Boolean>
Remarks
For external providers that verify emails or when email verification has been completed through challenge flows, this value is set to true. This is used in the email_verified claim in ID tokens.
JsonWebTokenPayloadExtensions.set_GrantId(JsonWebTokenPayload, string) Method
Identifies the refresh token family whose authority this token exercises, binding it to the lineage of every token derived from the same grant. A first-issued refresh token starts a new grant; each rotation carries the value forward, so a detected replay can revoke the whole family in one registry write (RFC 9700 Section 4.14.2).
public static void set_GrantId(Abblix.Jwt.JsonWebTokenPayload payload, string? value);Parameters
payload JsonWebTokenPayload
value System.String
Remarks
Present on an access or refresh token minted inside a family - the one the grant it was issued under carried, or the one started for a request issuing a refresh token. Absent (null) on every other token, an ID token included, which leaves the family cascade in the token-status validator inert for it.
JsonWebTokenPayloadExtensions.set_IdentityProvider(JsonWebTokenPayload, string) Method
Identifies the identity provider that authenticated the end user, useful in federated identity scenarios.
public static void set_IdentityProvider(Abblix.Jwt.JsonWebTokenPayload payload, string? value);Parameters
payload JsonWebTokenPayload
value System.String
Remarks
This claim is particularly relevant in systems that support multiple identity providers, helping to trace the origin of the authentication and ensuring that the JWT can be validated appropriately.
JsonWebTokenPayloadExtensions.set_Nonce(JsonWebTokenPayload, string) Method
A value used to associate a client session with an ID token, mitigating replay attacks.
public static void set_Nonce(Abblix.Jwt.JsonWebTokenPayload payload, string? value);Parameters
payload JsonWebTokenPayload
value System.String
JsonWebTokenPayloadExtensions.set_Scope(JsonWebTokenPayload, IEnumerable<string>) Method
The scope of access granted by the JWT. Scope is typically a space-separated list of permissions or access levels and is not part of the standard JWT claims.
public static void set_Scope(Abblix.Jwt.JsonWebTokenPayload payload, System.Collections.Generic.IEnumerable<string> value);Parameters
payload JsonWebTokenPayload
value System.Collections.Generic.IEnumerable<System.String>
Remarks
The 'scope' claim is often used in OAuth 2.0 and OpenID Connect contexts to specify the extent of access granted by the token. Each value in the list represents a specific permission or access level granted to the token bearer. This property ensures that the scope is represented appropriately as either a single value or an array of values.
JsonWebTokenPayloadExtensions.set_SessionId(JsonWebTokenPayload, string) Method
The session ID associated with the JWT, typically used to manage session state across applications.
public static void set_SessionId(Abblix.Jwt.JsonWebTokenPayload payload, string? value);Parameters
payload JsonWebTokenPayload
value System.String
Remarks
The session ID can link the JWT to a specific session for the user, allowing for effective session management and security controls.