TokenFailReason Uses EnumTrait
The value of "reason" in requests to Authlete's /api/auth/token/fail API.
Table of Contents
- $INVALID_RESOURCE_OWNER_CREDENTIALS : TokenFailReason
- The resource owner's credentials ("username" and "password" contained in the token request whose flow is Resource Owner Password Credentials) are invalid.
- $INVALID_TARGET : TokenFailReason
- The requested resource is invalid, missing, unknown, or malformed.
- $UNKNOWN : TokenFailReason
- Unknown reason.
- __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
$INVALID_RESOURCE_OWNER_CREDENTIALS
The resource owner's credentials ("username" and "password" contained in the token request whose flow is Resource Owner Password Credentials) are invalid.
public
static TokenFailReason
$INVALID_RESOURCE_OWNER_CREDENTIALS
Using this reason will result in error=invalid_request.
Tags
$INVALID_TARGET
The requested resource is invalid, missing, unknown, or malformed.
public
static TokenFailReason
$INVALID_TARGET
Using this reason will result in error=invalid_target.
Tags
$UNKNOWN
Unknown reason.
public
static TokenFailReason
$UNKNOWN
Using this reason will result in error=server_error.
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.