Skip to content

Interface: TokenValidatorContract

Interface: TokenValidatorContract

Defined in: auth-server-ts/src/contracts/token-validator.ts:15

Validates an access (or service) JWT locally and returns a typed AuthPrincipal.

Throws:

  • TokenExpiredException on exp passed.
  • TokenInvalidException on signature / audience / issuer / parse failure or when a refresh token is presented for auth.
  • TokenRevokedException on jti blacklist or per-user tv superseded.

Mirrors PHP’s Vendidit\AuthServer\Contracts\TokenValidator.

Methods

validate()

validate(jwt): Promise<AuthPrincipal>

Defined in: auth-server-ts/src/contracts/token-validator.ts:16

Parameters

jwt

string

Returns

Promise<AuthPrincipal>