HasApiTokens
trait HasApiTokens
Properties
| protected ScopeAuthorizable|null | $accessToken | The current access token for the authentication user. |
Methods
Get all of the user's registered OAuth applications.
Get the user's OAuth authorizations.
Get all of the access tokens for the user.
Get the access token currently associated with the user.
Get the access token currently associated with the user.
Determine if the current API token has a given scope.
Determine if the current API token is missing a given scope.
Create a new personal access token for the user.
Get the user provider name.
Details
at line 29
ClientRelation
oauthApps()
Get all of the user's registered OAuth applications.
at line 49
HasMany
oauthConsents()
Get the user's OAuth authorizations.
at line 66
TokenRelation
tokens()
Get all of the access tokens for the user.
at line 82
ScopeAuthorizable|null
token()
Get the access token currently associated with the user.
at line 90
ScopeAuthorizable|null
currentAccessToken()
Get the access token currently associated with the user.
at line 98
bool
tokenCan(string $scope)
Determine if the current API token has a given scope.
at line 106
bool
tokenCant(string $scope)
Determine if the current API token is missing a given scope.
at line 116
PersonalAccessTokenResult
createToken(string $name, array $scopes = [])
Create a new personal access token for the user.
at line 131
string
getProviderName()
Get the user provider name.
at line 152
HasApiTokens
withAccessToken(ScopeAuthorizable|null $accessToken)
Set the current access token for the user.