C# Class Cheesebaron.MvxPlugins.SimpleWebToken.SimpleWebToken

Inheritance: ISimpleWebToken
Afficher le fichier Open project: Cheesebaron/Cheesebaron.MvxPlugins Class Usage Examples

Méthodes publiques

Méthode Description
CreateToken ( string issuer, string audience, System.DateTime expiryTime, string signingKey, string>.IEnumerable values = null ) : ISimpleWebToken
CreateTokenFromRaw ( string rawToken ) : ISimpleWebToken
GenerateSignature ( string unsignedToken, byte signingKey ) : string
ValidateSignature ( string keyString ) : bool
this ( string key ) : string

Private Methods

Méthode Description
GetSwtTime ( System.DateTime time ) : long
GetTimeAsDateTime ( string expiryTime ) : System.DateTime

Convert the time in seconds to a DateTime object based on the base time defined by the Simple Web Token.

ToDateTimeFromEpoch ( long secondsSince1970 ) : System.DateTime

Turns a UNIX epoch into a DateTime

Method Details

CreateToken() public méthode

public CreateToken ( string issuer, string audience, System.DateTime expiryTime, string signingKey, string>.IEnumerable values = null ) : ISimpleWebToken
issuer string
audience string
expiryTime System.DateTime
signingKey string
values string>.IEnumerable
Résultat ISimpleWebToken

CreateTokenFromRaw() public méthode

public CreateTokenFromRaw ( string rawToken ) : ISimpleWebToken
rawToken string
Résultat ISimpleWebToken

GenerateSignature() public méthode

public GenerateSignature ( string unsignedToken, byte signingKey ) : string
unsignedToken string
signingKey byte
Résultat string

ValidateSignature() public méthode

public ValidateSignature ( string keyString ) : bool
keyString string
Résultat bool

this() public méthode

public this ( string key ) : string
key string
Résultat string