|
__7_ list< auto > | getKeys () |
|
bool | hasExpired (string token, int t) |
|
| removeToken (string token) |
|
bool | isEmpty () |
|
QorusAuthToken | getToken (string token) |
|
string | generate (hash cx, __7_ string client_id, timeout duration, int type, __7_ string auth_code) |
|
__7_ string | validate (hash cx, string token, __7_ string client_id) |
|
bool | validateAuthorizationCode (hash cx, string token, __7_ string client_id) |
|
nothing | dropToken (string token) |
|
|
const | TT_ACCESS = 0 |
|
const | TT_REFRESH = 1 |
|
const | TT_AUTHORIZATION = 2 |
|
Class to store authentication tokens.
◆ generate()
string QorusOAuth2RestApi::QorusAuthTokenStore::generate |
( |
hash |
cx, |
|
|
__7_ string |
client_id, |
|
|
timeout |
duration, |
|
|
int |
type, |
|
|
__7_ string |
auth_code |
|
) |
| |
|
inline |
Generates token
- Parameters
-
cx | request context |
client_id | id of OAuht2 client |
duration | in milliseconds |
type | type of token to be generated (TT_ACCESS, TT_AUTHORIZATION, TT_REFRESH) |
auth_code | authorization code issues during authorization step in Authorization Code Grant flow |
- Returns
- token itself
◆ hasExpired()
bool QorusOAuth2RestApi::QorusAuthTokenStore::hasExpired |
( |
string |
token, |
|
|
int |
t |
|
) |
| |
|
inline |
Checks if the token is still valid.
◆ removeToken()
QorusOAuth2RestApi::QorusAuthTokenStore::removeToken |
( |
string |
token | ) |
|
|
inline |
Removes token from the store
◆ validate()
__7_ string QorusOAuth2RestApi::QorusAuthTokenStore::validate |
( |
hash |
cx, |
|
|
string |
token, |
|
|
__7_ string |
client_id |
|
) |
| |
|
inline |
Validates token
- Parameters
-
cx | request context |
token | token to validate |
client_id | id of OAuht2 client |
- Returns
- string in format "<username>:<client_id>:oauth2"
◆ validateAuthorizationCode()
bool QorusOAuth2RestApi::QorusAuthTokenStore::validateAuthorizationCode |
( |
hash |
cx, |
|
|
string |
token, |
|
|
__7_ string |
client_id |
|
) |
| |
|
inline |
Validates authorization token used in Authorization Code Grant flow
- Parameters
-
cx | request context |
token | token to validate |
client_id | id of OAuht2 client |
- Returns
- boolean
The documentation for this class was generated from the following file: