TokenRequestValidator Class
Abblix.Oidc.Server
Abblix.Oidc.Server.Endpoints.Token
TokenRequestValidator Class
Validates token requests against OAuth 2.0 specifications, ensuring that requests are properly formed and authorized. This class plays a critical role in the OAuth 2.0 authentication and authorization process by verifying the integrity and authenticity of token requests, according to the framework defined in RFC 6749.
public class TokenRequestValidator : Abblix.Oidc.Server.Endpoints.Token.Interfaces.ITokenRequestValidator
Inheritance System.Object → TokenRequestValidator
Implements ITokenRequestValidator
Constructors
TokenRequestValidator(ITokenContextValidator) Constructor
Validates token requests against OAuth 2.0 specifications, ensuring that requests are properly formed and authorized. This class plays a critical role in the OAuth 2.0 authentication and authorization process by verifying the integrity and authenticity of token requests, according to the framework defined in RFC 6749.
public TokenRequestValidator(Abblix.Oidc.Server.Endpoints.Token.Validation.ITokenContextValidator validator);
Parameters
validator ITokenContextValidator
The token context validator used to validate token requests.
Methods
TokenRequestValidator.ValidateAsync(TokenRequest, ClientRequest) Method
Asynchronously validates a token request against the OAuth 2.0 specifications. It checks for proper authorization of the client, the validity of the grant type, and other request parameters. This process involves authenticating the client using the provided client authenticator and then delegating the grant-specific validation to the appropriate grant handler.
public System.Threading.Tasks.Task<Abblix.Utils.Result<Abblix.Oidc.Server.Endpoints.Token.Interfaces.ValidTokenRequest,Abblix.Oidc.Server.Common.OidcError>> ValidateAsync(Abblix.Oidc.Server.Model.TokenRequest tokenRequest, Abblix.Oidc.Server.Model.ClientRequest clientRequest);
Parameters
tokenRequest TokenRequest
The token request containing all necessary parameters for validation.
clientRequest ClientRequest
Client request information necessary for client authentication.
Implements ValidateAsync(TokenRequest, ClientRequest)
Returns
System.Threading.Tasks.Task<Abblix.Utils.Result<ValidTokenRequest,OidcError>>
A System.Threading.Tasks.Task that resolves to a Abblix.Utils.Result<>,
indicating the outcome of the validation process. This result can either denote a successful validation
or contain error information specifying why the request was invalid.