RevocationRequestValidator Class
Abblix.Oidc.Server
Abblix.Oidc.Server.Endpoints.Revocation
RevocationRequestValidator Class
Validates revocation requests in accordance with OAuth 2.0 standards. This class is responsible for ensuring that revocation requests meet the criteria specified in OAuth 2.0 Token Revocation (RFC 7009). It validates the authenticity of the client and the token involved in the request.
public class RevocationRequestValidator : Abblix.Oidc.Server.Endpoints.Revocation.Interfaces.IRevocationRequestValidator
Inheritance System.Object → RevocationRequestValidator
Implements IRevocationRequestValidator
Constructors
RevocationRequestValidator(ILogger<RevocationRequestValidator>, IClientAuthenticator, IAuthServiceJwtValidator) Constructor
Validates revocation requests in accordance with OAuth 2.0 standards. This class is responsible for ensuring that revocation requests meet the criteria specified in OAuth 2.0 Token Revocation (RFC 7009). It validates the authenticity of the client and the token involved in the request.
public RevocationRequestValidator(Microsoft.Extensions.Logging.ILogger<Abblix.Oidc.Server.Endpoints.Revocation.RevocationRequestValidator> logger, Abblix.Oidc.Server.Features.ClientAuthentication.IClientAuthenticator clientAuthenticator, Abblix.Oidc.Server.Features.Tokens.Validation.IAuthServiceJwtValidator jwtValidator);
Parameters
logger Microsoft.Extensions.Logging.ILogger<RevocationRequestValidator>
Provides logging capabilities to record validation outcomes and errors.
clientAuthenticator IClientAuthenticator
The client request authenticator to be used in the validation process. Ensures that the client sending the revocation request is authenticated and authorized to revoke tokens.
jwtValidator IAuthServiceJwtValidator
The JWT validator to be used for validating the token included in the revocation request. Ensures that the token is valid and that it belongs to the client requesting revocation.
Methods
RevocationRequestValidator.ValidateAsync(RevocationRequest, ClientRequest) Method
Asynchronously validates a revocation request against the OAuth 2.0 revocation request specifications. It checks the client's credentials and the validity of the token to be revoked. The validation ensures that the token belongs to the authenticated client and is valid as per JWT standards.
public System.Threading.Tasks.Task<Abblix.Utils.Result<Abblix.Oidc.Server.Endpoints.Revocation.Interfaces.ValidRevocationRequest,Abblix.Oidc.Server.Common.OidcError>> ValidateAsync(Abblix.Oidc.Server.Model.RevocationRequest revocationRequest, Abblix.Oidc.Server.Model.ClientRequest clientRequest);
Parameters
revocationRequest RevocationRequest
The revocation request to be validated. Contains the token to be revoked and client information.
clientRequest ClientRequest
Additional client request information for contextual validation.
Implements ValidateAsync(RevocationRequest, ClientRequest)
Returns
System.Threading.Tasks.Task<Abblix.Utils.Result<ValidRevocationRequest,OidcError>>
A System.Threading.Tasks.Task representing the asynchronous operation, which upon completion will yield a
Abblix.Utils.Result<>. The result indicates whether the request is valid or
contains any errors.
Remarks
This method follows the OAuth 2.0 revocation flow, ensuring that the token being revoked belongs to the authenticated client, protecting against cross-client token revocation. In case of validation failure, it logs a warning with the specific cause.