Share via


JwtFormat Class

 

Signs and validates JSON Web Tokens.

Namespace:   Microsoft.Owin.Security.Jwt
Assembly:  Microsoft.Owin.Security.Jwt (in Microsoft.Owin.Security.Jwt.dll)

Inheritance Hierarchy

System.Object
  Microsoft.Owin.Security.Jwt.JwtFormat

Syntax

public class JwtFormat : ISecureDataFormat<AuthenticationTicket>
public ref class JwtFormat : ISecureDataFormat<AuthenticationTicket^>
type JwtFormat = 
    class
        interface ISecureDataFormat<AuthenticationTicket>
    end
Public Class JwtFormat
    Implements ISecureDataFormat(Of AuthenticationTicket)

Constructors

Name Description
System_CAPS_protmethod JwtFormat()

Creates a new JwtFormat with TokenHandler and UseTokenLifetime enabled by default.

System_CAPS_pubmethod JwtFormat(IEnumerable<String>, IEnumerable<IIssuerSecurityTokenProvider>)

Initializes a new instance of the JwtFormat class.

System_CAPS_pubmethod JwtFormat(String, IIssuerSecurityTokenProvider)

Initializes a new instance of the JwtFormat class.

System_CAPS_pubmethod JwtFormat(TokenValidationParameters)

Initializes a new instance of the JwtFormat class.

System_CAPS_pubmethod JwtFormat(TokenValidationParameters, IIssuerSecurityTokenProvider)

Properties

Name Description
System_CAPS_pubproperty TokenHandler

A System.IdentityModel.Tokens.SecurityTokenHandler designed for creating and validating Json Web Tokens.

System_CAPS_pubproperty UseTokenLifetime

Indicates that the authentication session lifetime (e.g. cookies) should match that of the authentication token. If the token does not provide lifetime information then normal session lifetimes will be used. This is enabled by default.

System_CAPS_pubproperty ValidateIssuer

Gets or sets a value indicating whether JWT issuers should be validated.

Methods

Name Description
System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod Protect(AuthenticationTicket)

Transforms the specified authentication ticket into a JWT.

System_CAPS_pubmethod ToString()

(Inherited from Object.)

System_CAPS_pubmethod Unprotect(String)

Validates the specified JWT and builds an AuthenticationTicket from it.

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.

See Also

Microsoft.Owin.Security.Jwt Namespace

Return to top