Class Token
Manages JWT (JSON Web Token) instances.
Assembly: WMServer.dll
Syntax
Constructors
Token()
Declaration
Token(string, string, DateTime?, DateTime?)
Declaration
public Token(string accessTok, string refreshTok, DateTime? accessTokExp = null, DateTime? refreshTokExp = null)
Parameters
Properties
AccessToken
Declaration
public string AccessToken { get; set; }
Property Value
AccessTokenExp
Time at which the access token will expire.
Declaration
public DateTime AccessTokenExp { get; set; }
Property Value
RefreshToken
Declaration
public string RefreshToken { get; set; }
Property Value
RefreshTokenExp
Time at which the refresh token will expire.
Declaration
public DateTime RefreshTokenExp { get; set; }
Property Value
Methods
CreateToken(IEnumerable<Claim>)
Declaration
public static Token CreateToken(IEnumerable<Claim> claims)
Parameters
Returns
GetAPIKey(ControllerBase)
Declaration
public static string GetAPIKey(ControllerBase ctrl)
Parameters
Returns
GetClientAgent(ControllerBase)
Declaration
public static string GetClientAgent(ControllerBase ctrl)
Parameters
Returns
GetUser(ControllerBase)
Declaration
public static Task<WMUser> GetUser(ControllerBase ctrl)
Parameters
Returns
GetUserId(ControllerBase)
Declaration
public static string GetUserId(ControllerBase ctrl)
Parameters
Returns
Refresh()
Declaration
Returns