Skip to main content

IAuthServiceJwtValidator Interface

Abblix.Oidc.Server

Abblix.Oidc.Server.Features.Tokens.Validation

IAuthServiceJwtValidator Interface

Validates JWTs minted by this authorization server itself (its own access tokens, refresh tokens and Registration Access Tokens), checking signature against the server's signing keys, issuer equality, and audience membership against the configured client registry.

public interface IAuthServiceJwtValidator

Derived
AuthServiceJwtValidator

Methods

IAuthServiceJwtValidator.ValidateAsync(string, ValidationOptions) Method

Asynchronously validates a JSON Web Token (JWT) based on the provided validation options. This method ensures that the JWT is correctly formatted, signed, and adheres to the expected claims and audience.

System.Threading.Tasks.Task<Abblix.Utils.Result<Abblix.Jwt.JsonWebToken,Abblix.Jwt.JwtValidationError>> ValidateAsync(string jwt, Abblix.Jwt.ValidationOptions options=Abblix.Jwt.ValidationOptions.Default);

Parameters

jwt System.String

The JWT string to be validated.

options ValidationOptions

The validation options that control how the JWT is validated, including checks for issuer, audience, expiration, and more. Defaults to Default if not specified.

Returns

System.Threading.Tasks.Task<Abblix.Utils.Result<JsonWebToken,JwtValidationError>>
A task representing the asynchronous operation, resulting in a Result containing either a validated JsonWebToken or a JwtValidationError.