ModelOAuth module

AccessToken

A model in the OAuth module, with 16 members for templates, 12 API properties and 16 members for admin templates.

OAuth\Models\Frontend\AccessToken OAuth\Models\Api\AccessToken OAuth\Models\Backend\AccessToken Also in OAuth: AuthorizationCode CimdClient Client DcrClient Passkey RefreshToken RegisteredClient RememberMeToken UserAuthenticator UserOauthClient
View
What Smarty and Twig templates receive. Properties in REST API responses and job payloads. What admin screen templates receive when you override them.

Templates view

Properties 15

Take no arguments.

# hasRefreshToken()
bool
Does Access Token have a related Refresh Token?
# hasScope()
bool
Does Access Token have scope
# isValid()
bool
Determine if access token is valid for use
# isCurrentToken()
bool
Is this the token used for this request?
# getId()
?int
# getExpiryDate()
?DateTime
# getScope()
?string
# getCreated()
?DateTime
Date the record was created.
# getUserAgent()
?string
# getIpAddress()
?string
# getApp()
?Client
# getUser()
?User
# isNewRecord() Not in API & Jobs
bool
Check if the record is a new record
# isHierarchicalModel() Not in API & Jobs
bool
Check whether a model is a hierarchical model, i.e. can have children
# isVersionedModel() Not in API & Jobs
bool
Check whether a model is versioned

Methods 1

Take arguments. The API serialises only getters that need none.

# hasScopeIncluded(string $scope)
bool
Does this record have this scope?

API & Jobs view

API & JobsEach property is a key in REST API responses and job payloads. Its name is the template getter without get, is or has. Methods that need arguments are not available here.

Properties 12

Read-only values on the record.

# refreshToken
bool
Does Access Token have a related Refresh Token?
# scope
bool
Does Access Token have scope
# valid
bool
Determine if access token is valid for use
# currentToken
bool
Is this the token used for this request?
# id
?int
# expiryDate
?DateTime
# scope
?string
# created
?DateTime
Date the record was created.
# userAgent
?string
# ipAddress
?string
# app
?Client
# user
?User

Admin view

AdminAvailable in cdna-admin templates. Copy an admin template into your site repository to change how this record is edited.

Properties 15

Take no arguments.

# hasRefreshToken()
bool
Does Access Token have a related Refresh Token?
# hasScope()
bool
Does Access Token have scope
# isValid()
bool
Determine if access token is valid for use
# isCurrentToken()
bool
Is this the token used for this request?
# getId()
?int
# getExpiryDate()
?DateTime
# getScope()
?string
# getCreated()
?DateTime
Date the record was created.
# getUserAgent()
?string
# getIpAddress()
?string
# getApp()
?Client
# getUser()
?User
# isNewRecord() Not in API & Jobs
bool
Check if the record is a new record
# isHierarchicalModel() Not in API & Jobs
bool
Check whether a model is a hierarchical model, i.e. can have children
# isVersionedModel() Not in API & Jobs
bool
Check whether a model is versioned

Methods 1

Take arguments. The API serialises only getters that need none.

# hasScopeIncluded(string $scope)
bool
Does this record have this scope?