Skip to main content

ITokenRequestValidator Interface

Abblix.Oidc.Server

Abblix.Oidc.Server.Endpoints.Token.Interfaces

ITokenRequestValidator Interface

Validates an incoming OAuth 2.0 token request (RFC 6749 §3.2) against the rules required by the requested grant_type: client authentication, grant ownership (e.g. an authorization code MUST have been issued to the authenticated client per OIDC Core 1.0 §3.1.3.2), redirect URI equivalence for code exchange, scope and resource (RFC 8707) consistency, and PKCE verifier matching (RFC 7636 §4.5) where applicable.

public interface ITokenRequestValidator

Derived
TokenRequestValidator

Methods

ITokenRequestValidator.ValidateAsync(TokenRequest, ClientRequest) Method

Validates the request and returns a ValidTokenRequest ready for token issuance, or an OidcError using one of the codes from RFC 6749 §5.2 (e.g. invalid_grant, invalid_client, unsupported_grant_type).

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
clientRequest ClientRequest

Returns

System.Threading.Tasks.Task<Abblix.Utils.Result<ValidTokenRequest,OidcError>>