Table of Contents

Interface IJwtReader

Namespace
Tenduke.Core.Jwt
Assembly
Tenduke.Core.dll

Service for parsing and validating Json Web Tokens.

public interface IJwtReader

Methods

GetValidatedJsonWebTokenAsync(string)

Validates a raw JSON Web Token and returns the content represented as a JsonWebToken instance.

Task<JsonWebToken> GetValidatedJsonWebTokenAsync(string jwt)

Parameters

jwt string

The raw JSON Web Token.

Returns

Task<JsonWebToken>

The raw JSON Web Token represented as a JsonWebToken instance.

ParseAsync(string, bool)

Parse and validate a raw JSON Web Token.

Task<IEnumerable<Claim>> ParseAsync(string jwt, bool validateLifetime)

Parameters

jwt string

The raw JSON Web Token.

validateLifetime bool

Indicates whether or not the expiry and not before claims should be used to validate the lifetime of the token.

Returns

Task<IEnumerable<Claim>>

The set of claims from the JSON Web Token.