JwtSecurityTokenRequirement Class
Provides a location for settings that control how the JwtSecurityTokenHandler validates or creates a JwtSecurityToken.
Inheritance Hierarchy
System.Object
System.IdentityModel.Tokens.JwtSecurityTokenRequirement
Namespace: System.IdentityModel.Tokens
Assembly: System.IdentityModel.Tokens.Jwt (in System.IdentityModel.Tokens.Jwt.dll)
Syntax
'Declaration
Public Class JwtSecurityTokenRequirement
public class JwtSecurityTokenRequirement
public ref class JwtSecurityTokenRequirement
type JwtSecurityTokenRequirement = class end
public class JwtSecurityTokenRequirement
The JwtSecurityTokenRequirement type exposes the following members.
Constructors
Name | Description | |
---|---|---|
JwtSecurityTokenRequirement() | Creates an instance of JwtSecurityTokenRequirement | |
JwtSecurityTokenRequirement(XmlElement) | Provides additional configuration to the JwtSecurityTokenHandler when validating or creating a JwtSecurityToken. |
Top
Properties
Name | Description | |
---|---|---|
CertificateValidator | Gets or sets the X509CertificateValidator for validating X509Certificate2(s). | |
DefaultTokenLifetimeInMinutes | Gets or sets the default for token lifetime.JwtSecurityTokenHandler uses this value when creating a JwtSecurityToken if the expiration time is not specified. The expiration time will be set to UtcNow + FromMinutes with DefaultTokenLifetimeInMinutes as the parameter. | |
MaxClockSkew | Gets or sets the maximum clock skew to use when validating lifetime of a JwtSecurityToken. | |
MaximumTokenSizeInBytes | Gets or sets the maximum size of a JwtSecurityToken the JwtSecurityTokenHandler will read and validate. | |
NameClaimType | Gets or sets the String the JwtSecurityTokenHandler passes as a parameter to ClaimsIdentity.This defines the Type to match when finding the Value that is used for the Name property. | |
RoleClaimType | Gets or sets the String the JwtSecurityTokenHandler passes as a parameter to ClaimsIdentity.This defines the Claim(s) that will be considered when answering IsInRole |
Top
Methods
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Remarks
These values have precedence over Configuration.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.