OAuth2 plugin
QorusOAuth2RestApi::QorusAuthToken Class Reference

Public Member Functions

 constructor (timeout v_duration, int v_type, __7_ string v_client_id, string v_username)
 
 destructor ()
 
 refresh ()
 
bool hasExpired (int t)
 
string getToken ()
 
string getUsername ()
 
__7_ string getClientId ()
 
int getTokenExpirationTime ()
 
bool validForClient (__7_ string id)
 
int getType ()
 
__7_ string getChildToken ()
 
 addChildToken (string v_child_token)
 

Detailed Description

QorusAuthToken class ...

Member Function Documentation

◆ constructor()

QorusOAuth2RestApi::QorusAuthToken::constructor ( timeout  v_duration,
int  v_type,
__7_ string  v_client_id,
string  v_username 
)
inline
Parameters
v_durationnumber of seconds of inactivity after which the token expires
v_typetype of token to be generated (TT_ACCESS, TT_AUTHORIZATION, TT_REFRESH)
v_client_idid of OAuth2 client for which the token is being generated
v_usernamename of the user the client belongs to

◆ getToken()

string QorusOAuth2RestApi::QorusAuthToken::getToken ( )
inline

Get the token itself

◆ getTokenExpirationTime()

int QorusOAuth2RestApi::QorusAuthToken::getTokenExpirationTime ( )
inline

Get the time to live of the token

◆ getUsername()

string QorusOAuth2RestApi::QorusAuthToken::getUsername ( )
inline

Get name of the user

◆ hasExpired()

bool QorusOAuth2RestApi::QorusAuthToken::hasExpired ( int  t)
inline

Check if the token is still valid

◆ refresh()

QorusOAuth2RestApi::QorusAuthToken::refresh ( )
inline

Prolong the time to live of the token

◆ validForClient()

bool QorusOAuth2RestApi::QorusAuthToken::validForClient ( __7_ string  id)
inline

Checks if the token is valid for given client


The documentation for this class was generated from the following file: