TokenAction Uses EnumTrait
The value of "action" in responses from Authlete's /api/auth/token API.
Table of Contents
- $BAD_REQUEST : TokenAction
- The token request from the client application was wrong.
- $INTERNAL_SERVER_ERROR : TokenAction
- The request from your system to Authlete was wrong or an error occurred in Authlete.
- $INVALID_CLIENT : TokenAction
- Authentication of the client application failed.
- $OK : TokenAction
- The token request from the client was valid.
- $PASSWORD : TokenAction
- The token request from the client application was valid and the grant type is "password".
- __toString() : string
- Get the name of this instance.
- name() : string
- Get the name of this instance.
- valueOf() : static
- Get an instance of this class that the given argument represents.
- values() : array<string|int, mixed>
- Get the list of public class variables listed in this class.
Properties
$BAD_REQUEST
The token request from the client application was wrong.
public
static TokenAction
$BAD_REQUEST
The token endpoint implementation should return 400 Bad Request
to
the client appication.
Tags
$INTERNAL_SERVER_ERROR
The request from your system to Authlete was wrong or an error occurred in Authlete.
public
static TokenAction
$INTERNAL_SERVER_ERROR
The token endpoint implementation should return
500 Internal Server Error
to the client application.
Tags
$INVALID_CLIENT
Authentication of the client application failed.
public
static TokenAction
$INVALID_CLIENT
The token endpoint implementation should return either
400 Bad Request
or 401 Unauthorized
to the client application.
Tags
$OK
The token request from the client was valid.
public
static TokenAction
$OK
The token endpoint implementation should return 200 OK
to the client
application with an access token.
Tags
$PASSWORD
The token request from the client application was valid and the grant type is "password".
public
static TokenAction
$PASSWORD
The token endpoint implementation should validate the credentials of
the resource owner and call Authlete's /api/auth/token/issue
API or
/api/auth/token/fail
API according to the result of the validation.
Tags
Methods
__toString()
Get the name of this instance.
public
__toString() : string
Return values
string —The name of this instance.
name()
Get the name of this instance.
public
name() : string
Return values
string —The name of this instance.
valueOf()
Get an instance of this class that the given argument represents.
public
static valueOf(mixed $value) : static
If the given argument is an instance of this class, the instance itself is returned.
Otherwise, if the given argument is null
, null
is returned.
Otherwise, if the type of the given argument is not string
,
an InvalidArgumentException
is returned.
Otherwise, a class variable whose name is equal to the given
argument is looked up. If found, the instance is returned.
If not found, an InvalidArgumentException
is thrown.
Parameters
- $value : mixed
-
A string that represents an instance of this class, or an instance of this class, or
null
.
Return values
static —An instance of this class.
values()
Get the list of public class variables listed in this class.
public
static values() : array<string|int, mixed>
Return values
array<string|int, mixed> —Instances of this class which are defined as public class variables.