Interface ICustomTokenValidator
- Namespace
- Fdyay.IdentityServer.Validation
- Assembly
- Fdyay.IdentityServer.Core.dll
A host's own checks on a token this server has validated, after its own.
public interface ICustomTokenValidator
Remarks
Duende 8.0.1's ICustomTokenValidator, measured: handed every token that passed validation — an access token
presented to the userinfo, introspection or token exchange endpoints or a local API, an identity token presented as
a hint — and answering with the result that stands, which may refuse the token or carry other claims. Duende's takes
one result type for both; this server keeps an access token's result and an identity token's apart, so each method
takes its own. There is no builder method, as in Duende: a host registers its own over the default.
Methods
ValidateAccessTokenAsync(AccessTokenValidationResult, CancellationToken)
Runs the host's checks on an access token this server has validated.
Task<AccessTokenValidationResult> ValidateAccessTokenAsync(AccessTokenValidationResult result, CancellationToken ct)
Parameters
resultAccessTokenValidationResultThe successful result of this server's own validation.
ctCancellationTokenCancels the checks.
Returns
- Task<AccessTokenValidationResult>
The result that stands:
result, one with other claims, or a refusal.
ValidateIdentityTokenAsync(IdentityTokenValidationResult, CancellationToken)
Runs the host's checks on an identity token hint this server has validated.
Task<IdentityTokenValidationResult> ValidateIdentityTokenAsync(IdentityTokenValidationResult result, CancellationToken ct)
Parameters
resultIdentityTokenValidationResultThe successful result of this server's own validation.
ctCancellationTokenCancels the checks.
Returns
- Task<IdentityTokenValidationResult>
The result that stands:
result, one with other claims, or a refusal.