Share via


JwtSecurityTokenHandler.MaxClockSkew Property

Gets or sets the clockskew to use when validating times.

Namespace:  System.IdentityModel.Tokens
Assembly:  System.IdentityModel.Tokens.Jwt (in System.IdentityModel.Tokens.Jwt.dll)

Syntax

'Declaration
Public Property MaxClockSkew As TimeSpan
public TimeSpan MaxClockSkew { get; set; }
public:
property TimeSpan MaxClockSkew {
    TimeSpan get ();
    void set (TimeSpan value);
}
member MaxClockSkew : TimeSpan with get, set
function get MaxClockSkew () : TimeSpan 
function set MaxClockSkew (value : TimeSpan)

Property Value

Type: System.TimeSpan
Returns TimeSpan.

Exceptions

Exception Condition
ArgumentOutOfRangeException

'value' is less than Zero

Remarks

The following search path is used to obtain the clockskew to return:1. If JwtSecurityTokenRequirement.MaxClockSkew.HasValue, return this value.

----2. If JwtSecurityTokenHandler.Configuration is not null, return JwtSecurityTokenHandler.Configuration.MaxClockSkew.

----3. default: DefaultMaxClockSkew.

.NET Framework Security

See Also

Reference

JwtSecurityTokenHandler Class

System.IdentityModel.Tokens Namespace