Table of Contents

TJwtMiddleware.DeserializeIdentity Method

Validates the specified token and builds a user identity from its claims.

Remarks

Raises EJOSEException or EInvalidJWTException if the token cannot be validated.

Syntax

Unit: Sparkle.Middleware.Jwt

function TJwtMiddleware.DeserializeIdentity(const Token: string; Context: THttpServerContext): IUserIdentity;

Parameters

<-> Parameter Type Description
const Token string The encoded JWT to deserialize and validate.
Context THttpServerContext The HTTP server context of the current request.

Returns

An IUserIdentity holding the claims of the validated token.

See also