OAuth2.Server.Sessionpersistent class OAuth2.Server.Session
The OAuth2.Server.Session class is the default SessionClass which is included with the server.
The default class will use httpOnly cookies to maintain the session.
The SessionClass is specified in the Authorization Server Configuration. The SessionClass must contain GetUser, Update, Login and Logout methods with signatures as specified in this class.
The time when the user was authenticated.
Cookie that is used to track the session.
Expires is the time in seconds from beginning of the Unix epoch when the session expires. If Expires="", then session does not expire.
Scope is the blank separated list of scopes permitted for this user in this session.
User that is logged in by this session.
Clean up all expired sessions
Delete this session object
An overridable method to obtain the cookie. This allows easy change of the cookie format.
The GetCurrentSession method returns the currently logged in session. If no session exists, then "" is returned.
The GetUser method returns the name of the user currently logged into this session. If no session exists, then "" is returned.
The Login method creates a new session for the user named by username.
The scope argument specifies a blank separated list of scopes that this user is authorized for. The interval argument is seconds until expiration for the session. If interval=0, then the session will not expire.
The Logout method terminates the current session. It is not considered an error to have no current session.
An overridable method to create a new cookie value. This allows easy change of the cookie format.
Open the OAuth2.Server.Session instance using Cookie.
Set the cookie.
The Update method updates the existing current session. The blank separated list of scopes in the scope argument updates the scopes associated with the session. If the interval argument is specified the session interval is updated. The interval argument is seconds until expiration for the session. If interval=0, then the session will not expire.