Aller au contenu
Cette page n'a pas encore été traduite.

SyncTokenContextValidatorBase Class

Provides a base class for implementing synchronous token context validators. This class simplifies the creation of token context validators by offering a synchronous validation method that is automatically wrapped in an asynchronous call.

C#
public abstract class SyncTokenContextValidatorBase : Abblix.Oidc.Server.Endpoints.Token.Validation.ITokenContextValidator

Inheritance System.Object → SyncTokenContextValidatorBase

Derived
↳ ResourceValidator
↳ ScopeValidator

Implements ITokenContextValidator

Methods

SyncTokenContextValidatorBase.ValidateAsync(TokenValidationContext, CancellationToken) Method

Asynchronously validates the token request within the provided context by invoking the synchronous Abblix.Oidc.Server.Endpoints.Token.Validation.SyncTokenContextValidatorBase.Validate(Abblix.Oidc.Server.Endpoints.Token.Validation.TokenValidationContext) method.

C#
public System.Threading.Tasks.Task<Abblix.Oidc.Server.Common.OidcError?> ValidateAsync(Abblix.Oidc.Server.Endpoints.Token.Validation.TokenValidationContext context, System.Threading.CancellationToken cancellationToken);

Parameters

context TokenValidationContext

The context containing the token request and related information that needs to be validated.

cancellationToken System.Threading.CancellationToken

Abandons the operation when the caller stops waiting.

Implements ValidateAsync(TokenValidationContext, CancellationToken)

Returns

System.Threading.Tasks.Task<OidcError>
A System.Threading.Tasks.Task that resolves to a OidcError containing error details if the validation fails; otherwise, resolves to null indicating that the validation was successful.