Метод | Описание | |
---|---|---|
GenerateToken ( ) : string |
Generates a new authentication token using a crytographically-secure random number generator
|
|
GetExpiration ( ) : System.DateTime |
Returns a DateTime object that represents the moment the token expires
|
|
TrimMilliseconds ( System.DateTime dt ) : System.DateTime |
Because dateTimes are stupid
|
|
UserToken ( String username, System.DateTime expires, string token ) : System | ||
Verify ( |
Verifies that two tokens are equal to each other and the "expires" date has not passed. Uses SlowEquals to prevent timing attacks.
|
public static GenerateToken ( ) : string | ||
Результат | string |
public static GetExpiration ( ) : System.DateTime | ||
Результат | System.DateTime |
public static TrimMilliseconds ( System.DateTime dt ) : System.DateTime | ||
dt | System.DateTime | |
Результат | System.DateTime |
public UserToken ( String username, System.DateTime expires, string token ) : System | ||
username | String | |
expires | System.DateTime | |
token | string | |
Результат | System |
public Verify ( |
||
token | Token to compare | |
Результат | bool |