JwtSecurityTokenHandler.ValidateLifetime Method

Definition

Validates the lifetime of a JwtSecurityToken.

protected virtual void ValidateLifetime (DateTime? notBefore, DateTime? expires, System.IdentityModel.Tokens.Jwt.JwtSecurityToken jwtToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters);
abstract member ValidateLifetime : Nullable<DateTime> * Nullable<DateTime> * System.IdentityModel.Tokens.Jwt.JwtSecurityToken * Microsoft.IdentityModel.Tokens.TokenValidationParameters -> unit
override this.ValidateLifetime : Nullable<DateTime> * Nullable<DateTime> * System.IdentityModel.Tokens.Jwt.JwtSecurityToken * Microsoft.IdentityModel.Tokens.TokenValidationParameters -> unit
Protected Overridable Sub ValidateLifetime (notBefore As Nullable(Of DateTime), expires As Nullable(Of DateTime), jwtToken As JwtSecurityToken, validationParameters As TokenValidationParameters)

Parameters

notBefore
Nullable<DateTime>

The DateTime value of the 'nbf' claim if it exists in the 'jwtToken'.

expires
Nullable<DateTime>

The DateTime value of the 'exp' claim if it exists in the 'jwtToken'.

jwtToken
JwtSecurityToken

The JwtSecurityToken being validated.

validationParameters
TokenValidationParameters

The TokenValidationParameters to be used for validating the token.

Remarks

ValidateLifetime(Nullable<DateTime>, Nullable<DateTime>, SecurityToken, TokenValidationParameters) for additional details.

Applies to