GrantType Uses EnumTrait
Grant types.
Table of Contents
- $AUTHORIZATION_CODE : GrantType
- Authorization Code flow.
- $CIBA : GrantType
- CIBA flow.
- $CLIENT_CREDENTIALS : GrantType
- Client Credentials flow.
- $DEVICE_CODE : GrantType
- Device flow.
- $IMPLICIT : GrantType
- Implicit flow.
- $PASSWORD : GrantType
- Resource Owner Password Credentials flow.
- $REFRESH_TOKEN : GrantType
- Refresh Token flow.
- __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
$AUTHORIZATION_CODE
Authorization Code flow.
public
static GrantType
$AUTHORIZATION_CODE
A grant type to request an access token and/or and ID token, and optionally a refresh token, using an authorization code.
Tags
$CIBA
CIBA flow.
public
static GrantType
$CIBA
A grant type to request an ID token, an access token, and optionally a refresh token.
Tags
$CLIENT_CREDENTIALS
Client Credentials flow.
public
static GrantType
$CLIENT_CREDENTIALS
A grant type to request an access token using a client's credentials.
Tags
$DEVICE_CODE
Device flow.
public
static GrantType
$DEVICE_CODE
A grant type to request an access token and optionally a refresh token.
Tags
$IMPLICIT
Implicit flow.
public
static GrantType
$IMPLICIT
This is not a valid value for the grant_type request parameter
of token requests but is listed here because OpenID Connect
Dynamic Client Registration 1.0 uses implicit as a value
of grant_types of client metadata.
Tags
$PASSWORD
Resource Owner Password Credentials flow.
public
static GrantType
$PASSWORD
A grant type to request an access token using a resource owner's "username" and "password".
Tags
$REFRESH_TOKEN
Refresh Token flow.
public
static GrantType
$REFRESH_TOKEN
A grant type to request an access token, and optionally an ID token and/or a refresh token, using a refresh 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.