Method | Description | |
---|---|---|
GenerateToken ( string user, string container, string docId ) : System.IdentityModel.Tokens.JwtSecurityToken |
Generates an access token for the user and file
|
|
GetUserFromToken ( string tokenString ) : string |
Extracts the user information from a provided access token
|
|
ValidateToken ( string tokenString, string container, string docId ) : bool |
Generates an access token specific to a user and file
|
|
WriteToken ( System.IdentityModel.Tokens.JwtSecurityToken token ) : string |
Converts the JwtSecurityToken to a Base64 string that can be used by the Host
|
Method | Description | |
---|---|---|
getCert ( ) : |
Gets the self-signed certificate used to sign the access tokens
|
public GenerateToken ( string user, string container, string docId ) : System.IdentityModel.Tokens.JwtSecurityToken | ||
user | string | |
container | string | |
docId | string | |
return | System.IdentityModel.Tokens.JwtSecurityToken |
public static GetUserFromToken ( string tokenString ) : string | ||
tokenString | string | |
return | string |
public static ValidateToken ( string tokenString, string container, string docId ) : bool | ||
tokenString | string | |
container | string | |
docId | string | |
return | bool |
public WriteToken ( System.IdentityModel.Tokens.JwtSecurityToken token ) : string | ||
token | System.IdentityModel.Tokens.JwtSecurityToken | |
return | string |