ResponseType Uses EnumTrait
Response types. See "OAuth 2.0 Multiple Response Type Encoding Practices" for details.
Tags
Table of Contents
- $CODE : ResponseType
- "code"; a "response_type" to request an authorization code.
- $CODE_ID_TOKEN : ResponseType
- "code id_token"; a "response_type" to request an authorization code and an ID token.
- $CODE_ID_TOKEN_TOKEN : ResponseType
- "code id_token token"; a "response_type" to request an authorization code, an ID token and an access token.
- $CODE_TOKEN : ResponseType
- "code token"; a "response_type" to request an authorization code and an access token.
- $ID_TOKEN : ResponseType
- "id_token"; a "response_type" to request an ID token.
- $ID_TOKEN_TOKEN : ResponseType
- "id_token token"; a "response_type" to request an ID token and an access token.
- $NONE : ResponseType
- "none"; a "response_type" to request no access credentials.
- $TOKEN : ResponseType
- "token"; a "response_type" to request an access token.
- __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
$CODE
"code"; a "response_type" to request an authorization code.
public
static ResponseType
$CODE
Tags
$CODE_ID_TOKEN
"code id_token"; a "response_type" to request an authorization code and an ID token.
public
static ResponseType
$CODE_ID_TOKEN
Tags
$CODE_ID_TOKEN_TOKEN
"code id_token token"; a "response_type" to request an authorization code, an ID token and an access token.
public
static ResponseType
$CODE_ID_TOKEN_TOKEN
Tags
$CODE_TOKEN
"code token"; a "response_type" to request an authorization code and an access token.
public
static ResponseType
$CODE_TOKEN
Tags
$ID_TOKEN
"id_token"; a "response_type" to request an ID token.
public
static ResponseType
$ID_TOKEN
Tags
$ID_TOKEN_TOKEN
"id_token token"; a "response_type" to request an ID token and an access token.
public
static ResponseType
$ID_TOKEN_TOKEN
Tags
$NONE
"none"; a "response_type" to request no access credentials.
public
static ResponseType
$NONE
Tags
$TOKEN
"token"; a "response_type" to request an access token.
public
static ResponseType
$TOKEN
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.