Class IntrospectionRequestValidator
- Namespace
- Fdyay.IdentityServer.Validation
- Assembly
- Fdyay.IdentityServer.Core.dll
Duende's default introspection request validator.
public class IntrospectionRequestValidator : IIntrospectionRequestValidator
- Inheritance
-
IntrospectionRequestValidator
- Implements
- Inherited Members
Constructors
IntrospectionRequestValidator(ITokenValidator, IRefreshTokenService)
Creates the validator.
public IntrospectionRequestValidator(ITokenValidator tokens, IRefreshTokenService refreshTokens)
Parameters
tokensITokenValidatorValidates access tokens, JWT and reference alike.
refreshTokensIRefreshTokenServiceValidates refresh tokens for the client that holds them.
Methods
ValidateAsync(IntrospectionRequestValidationContext, CancellationToken)
Reads the token the request names and decides whether it is active for the caller.
public virtual Task<IntrospectionRequestValidationResult> ValidateAsync(IntrospectionRequestValidationContext context, CancellationToken ct)
Parameters
contextIntrospectionRequestValidationContextThe request's form and the caller — an API resource or a client, exactly one of them.
ctCancellationTokenCancels the token validation.
Returns
- Task<IntrospectionRequestValidationResult>
The token's activity and claims, or a refused request when no token was named.
Exceptions
- ArgumentNullException
contextisnull.- ArgumentException
The context names both an API resource and a client, or neither.