This class defines the interface for the OAuth2 Server session maintenance class. More...
Static Public Member Functions | |
_.Library.Status | DeleteAll () |
This method deletes all current sessions. | |
_.Library.String | GetUser (_.Library.String scope, _.Library.Integer authTime, _.Library.Status sc, _.Library.String authCode) |
This method returns the name of the user currently logged into this session. More... | |
_.Library.Status | Login (_.Library.String username, _.Library.String scope, _.Library.Integer interval, _.Library.Integer authTime, _.Library.String authCode) |
This method creates a new session for the user named by username. More... | |
_.Library.Status | Logout () |
The Logout method terminates the current session. More... | |
_.Library.Status | Update (_.Library.String scope, _.Library.Integer interval) |
This method updates the current session with the provided values. More... | |
_.Library.Status | UpdateTokenGroup (_.Library.String authCode, _.Library.String groupId, _.Library.Boolean force) |
This method will update the <Class>OAuth2.Server.AccessToken<Class> identified by authcode with the given groupId. More... | |
This class defines the interface for the OAuth2 Server session maintenance class.
If SupportSession is true in <Class>OAuth2.Server.Configuration</Class> then this class is used to track the user's session. The default session maintenance class is <Class>OAuth2.Server.Session</Class>. The behavior can be customized by creating a subclasss of this class.
|
static |
This method returns the name of the user currently logged into this session.
If no session exists, then "" is returned.
The set of scopes associated with this session are returned in the scope parameter.
The time the session was created is returned in the authTime parameter.
The sc parameter contains the error code (or $$$OK if no error occurred).
authCode contains the Authorization Code from the associated Access Token. This can be used to associate the Access Token with the session.
Reimplemented in CookieSession.
|
static |
This method creates a new session for the user named by username.
The scope argument specifies a blank separated list of scopes for which the user is authorized.
The interval argument is seconds until expiration for the session.
If interval=0, then the session will not expire.
authTime indicates the time at which the session was created. This should be specified as the number of seconds since the start of the UNIX epoch. This can be computed using
Set authTime = ##class(OAuth2.Utils).TimeInSeconds($ztimestamp,0)
authCode contains the Authorization Code from the associated Access Token. This can be used to associate the Access Token with the session.
Reimplemented in CookieSession.
|
static |
The Logout method terminates the current session.
This may be called when there is no current session.
Reimplemented in CookieSession.
|
static |
This method updates the current session with the provided values.
scope is a blank separated list of scope values to associate with the session.
If the interval argument is specified the session interval should be updated.
The interval argument is seconds until expiration for the session. If interval=0, then the session will not expire.
Reimplemented in CookieSession.
|
static |
This method will update the <Class>OAuth2.Server.AccessToken<Class> identified by authcode with the given groupId.
This can be used to associate the Access Token with the user's session. The Access Token will not be updated if it already is associated with a GroupId, unless force is true. Note that any subclass of this class MUST use the <Class>OAuth2.Server.AccessToken<Class> GroupId property to associate tokens with sessions. All tokens that have the same GroupId are part of the same session.