JwtFormat.Protect Method

Transforms the specified authentication ticket into a JWT.

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

Syntax

'Declaration
Public Function Protect ( _
    data As AuthenticationTicket _
) As String
'Usage
Dim instance As JwtFormat 
Dim data As AuthenticationTicket 
Dim returnValue As String 

returnValue = instance.Protect(data)
public string Protect(
    AuthenticationTicket data
)
public:
virtual String^ Protect(
    AuthenticationTicket^ data
) sealed
abstract Protect : 
        data:AuthenticationTicket -> string  
override Protect : 
        data:AuthenticationTicket -> string
public final function Protect(
    data : AuthenticationTicket
) : String

Parameters

Return Value

Type: System.String

Implements

ISecureDataFormat<TData>.Protect(TData)

Exceptions

Exception Condition
ArgumentNullException

Thrown if the data is null.

NotSupportedException

Thrown if the IssuingSecurityTokenProvider is not a SigningSecurityTokenProvider.

See Also

Reference

JwtFormat Class

Microsoft.Owin.Security.Jwt Namespace