JwtFormat.Unprotect Method
Validates the specified JWT Token and builds an AuthenticationTicket from it.
Namespace: Microsoft.Owin.Security.Jwt
Assembly: Microsoft.Owin.Security.Jwt (in Microsoft.Owin.Security.Jwt.dll)
Syntax
'Declaration
Public Function Unprotect ( _
protectedText As String _
) As AuthenticationTicket
'Usage
Dim instance As JwtFormat
Dim protectedText As String
Dim returnValue As AuthenticationTicket
returnValue = instance.Unprotect(protectedText)
public AuthenticationTicket Unprotect(
string protectedText
)
public:
virtual AuthenticationTicket^ Unprotect(
String^ protectedText
) sealed
abstract Unprotect :
protectedText:string -> AuthenticationTicket
override Unprotect :
protectedText:string -> AuthenticationTicket
public final function Unprotect(
protectedText : String
) : AuthenticationTicket
Parameters
- protectedText
Type: System.String
Return Value
Type: Microsoft.Owin.Security.AuthenticationTicket
An AuthenticationTicket built from the jwtToken
Implements
ISecureDataFormat<TData>.Unprotect(String)
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | Thrown if the jwtToken is null. |
ArgumentOutOfRangeException | Thrown if the jwtToken is not a JWT token. |