%SYS
AccessToken Class Reference

OAuth2.AccessToken stores an OAuth 2.0 access token and its related information. More...

Inheritance diagram for AccessToken:
Collaboration diagram for AccessToken:

Public Member Functions

 ClearError ()
 Clear the error.
 
_.Library.Boolean IsError ()
 Return if an error been set.
 
_.Library.Boolean IsExpired ()
 Check if this token is expired.
 
_.Library.Boolean IsOpenID ()
 Is this an OpenID authorization request? Find out by looking for openid scope.
 
_.Library.Status Remove ()
 Remove this token from the client. More...
 
 SetError (_.OAuth2.Error error)
 Set the error.
 
def __init__ (self)
 If TemporarySession is true, then this access token object was created for a temproary session by OAuth2.Login. More...
 

Static Public Member Functions

OAuth2.AccessToken Open (_.Library.String accessToken, _.Library.Status sc)
 Open an OAuth2.AccessToken instance based on the AccessToken property.
 
OAuth2.AccessToken OpenByIDToken (_.Library.String IDToken, _.Library.Status sc)
 Open an OAuth2.AccessToken instance based on the IDToken property.
 
OAuth2.AccessToken OpenForSession (_.Library.String applicationName, _.Library.String sessionId, _.Library.Status sc)
 Open an OAuth2.AccessToken instance based on the session and client application that it is linked to.
 

Public Attributes

 AccessToken
 The access token. More...
 
 ApplicationName
 This access token is linked to this client application. More...
 
 CodeVerifier
 Code verifier sent with authorization requests when using the authorization_code grant type. More...
 
 Error
 Error object for error during authorization. More...
 
 Expires
 The time when the token expires in seconds since December 31st, 1840 (i.e. More...
 
 GrantType
 GrantType is the grant type that was used to create this access token: More...
 
 Hash
 SHA512 hash of the AccessToken to be used for indexing. More...
 
 IDHash
 SHA512 hash of the IDToken to be used for indexing. More...
 
 IDToken
 The IDToken. More...
 
 LogoutState
 The base64 encoded random state associated with a logout request to the Authorization Server. More...
 
 Nonce
 Nonce for OpenID Connect request. More...
 
 RefreshToken
 The refresh token that is returned by the authorization server or "". More...
 
 ResponseMode
 The response_mode of the access token request: query or fragment. More...
 
 ResponseProperties
 ResponseProperties contains the response properties from the access token request. More...
 
 ResponseType
 The response_type of the access token request. More...
 
 Scope
 Blank separated list of scope names which this token supports. More...
 
 SessionId
 This access token is linked to the session whose id is here. More...
 
 State
 The base64 encoded random state associated with request to Authorization Server. More...
 
 TemporarySession
 
 TokenType
 The token type that is returned from the authorization server. More...
 

Detailed Description

OAuth2.AccessToken stores an OAuth 2.0 access token and its related information.


OAuth2.AccessToken is indexed by the combination of SessionId and ApplicationName. Therefore, only one scope may be requested for each SessionId/ApplicationName. If a second request is made with a different scope and access token has yet been granted, the scope in the new request becomes the expected scope.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self)

If TemporarySession is true, then this access token object was created for a temproary session by OAuth2.Login.

This object should not be deleted by the end session event handler.  

Member Function Documentation

◆ Remove()

_.Library.Status Remove ( )

Remove this token from the client.

If this token is currently processing a RP-initiated front-channel logout request

(That is, if <Property>InLogout</Property> is true,) then the token(s) will be removed, but the AccessToken record will not be deleted until the logout is completed or times out.

Member Data Documentation

◆ AccessToken

The access token.

 

◆ ApplicationName

ApplicationName

This access token is linked to this client application.

 

◆ CodeVerifier

CodeVerifier

Code verifier sent with authorization requests when using the authorization_code grant type.

This is in accordance with PKCE (RFC7636).  

◆ Error

Error

Error object for error during authorization.

 

◆ Expires

Expires

The time when the token expires in seconds since December 31st, 1840 (i.e.

since beginning of $h)

 

◆ GrantType

GrantType

GrantType is the grant type that was used to create this access token:

  • "A" - Authorization Code
  • "I" - Implicit
  • "P" - Resource Owner Password Credentials
  • "C" - Client Credentials
  • "J" - JWT Authorization  

◆ Hash

Hash

SHA512 hash of the AccessToken to be used for indexing.

 

◆ IDHash

IDHash

SHA512 hash of the IDToken to be used for indexing.

 

◆ IDToken

IDToken

The IDToken.

 

◆ LogoutState

LogoutState

The base64 encoded random state associated with a logout request to the Authorization Server.

 

◆ Nonce

Nonce

Nonce for OpenID Connect request.

This nonce must be included in the IDToken.

 

◆ RefreshToken

RefreshToken

The refresh token that is returned by the authorization server or "".

 

◆ ResponseMode

ResponseMode

The response_mode of the access token request: query or fragment.

 

◆ ResponseProperties

ResponseProperties

ResponseProperties contains the response properties from the access token request.

where the key is the property name and the value is the property value.  

◆ ResponseType

ResponseType

The response_type of the access token request.

 

◆ Scope

Scope

Blank separated list of scope names which this token supports.

 

◆ SessionId

SessionId

This access token is linked to the session whose id is here.

 

◆ State

State

The base64 encoded random state associated with request to Authorization Server.

 

◆ TemporarySession

TemporarySession

◆ TokenType

TokenType

The token type that is returned from the authorization server.