JwtSecurityTokenHandler.RequireExpirationTime Property
Gets or sets a value indicating whether if the 'expiration' value in a JwtSecurityToken is required.
Namespace: System.IdentityModel.Tokens
Assembly: System.IdentityModel.Tokens.Jwt (in System.IdentityModel.Tokens.Jwt.dll)
Syntax
'Declaration
Public Property RequireExpirationTime As Boolean
public bool RequireExpirationTime { get; set; }
public:
property bool RequireExpirationTime {
bool get ();
void set (bool value);
}
member RequireExpirationTime : bool with get, set
function get RequireExpirationTime () : boolean
function set RequireExpirationTime (value : boolean)
Property Value
Type: System.Boolean
Returns Boolean.
Remarks
If 'true' then:A JwtSecurityToken will be considered invalid if it does not contain an 'expiration' value.
When creating a JwtSecurityToken if Lifetime is not specified a default will be added to the payload. See for details on the calculation of the 'expiration' value.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.