UserInfoRequest implements ArrayCopyable, Arrayable, Jsonable Uses ArrayTrait, JsonTrait
Request to Authlete's /api/auth/userinfo API.
Interfaces, Classes and Traits
- ArrayCopyable
- Interface to declare instances can be converted into/from arrays.
- Arrayable
- Interface to declare that instances can be converted into an array.
- Jsonable
- Interface to declare that instances can be converted into JSON strings.
Table of Contents
- copyFromArray() : mixed
- Copy the content of the given array into this object.
- copyToArray() : mixed
- Copy the content of this object into the given array.
- fromArray() : static
- Convert an array into an instance of this class.
- fromJson() : static
- Convert a JSON string into an instance of this class.
- getClientCertificate() : string
- Get the client certificate from the MTLS of the userinfo request from the client application.
- getDpop() : string
- Get the `DPoP` header presented by the client during the request to the userinfo endpoint. This header contains a signed JWT which includes the public key that is paired with the private key used to sign it.
- getHtm() : string
- Get the HTTP method of the userinfo request. This property is used to validate the `DPoP` header.
- getHtu() : string
- Get the URL of the userinfo endpoint. This property is used to validate the `DPoP` header.
- getToken() : string
- Get the access token that the userinfo endpoint implementation received from the client application.
- setClientCertificate() : UserInfoRequest
- Set the client certificate from the MTLS of the userinfo request from the client application.
- setDpop() : UserInfoRequest
- Set the `DPoP` header presented by the client during the request to the userinfo endpoint. This header contains a signed JWT which includes the public key that is paired with the private key used to sign it.
- setHtm() : UeerInfoRequest
- Set the HTTP method of the userinfo request. This property is used to validate the `DPoP` header.
- setHtu() : UserInfoRequest
- Set the URL of the userinfo endpoint. This property is used to validate the `DPoP` header.
- setToken() : UserInfoRequest
- Set the access token that the userinfo endpoint implementation received from the client application.
- toArray() : array<string|int, mixed>
- Convert this object into an array.
- toJson() : string
- Convert this object into a JSON string.
Methods
copyFromArray()
Copy the content of the given array into this object.
public
copyFromArray(array<string|int, mixed> &$array) : mixed
Parameters
- $array : array<string|int, mixed>
Return values
mixed —copyToArray()
Copy the content of this object into the given array.
public
copyToArray(array<string|int, mixed> &$array) : mixed
Parameters
- $array : array<string|int, mixed>
Return values
mixed —fromArray()
Convert an array into an instance of this class.
public
static fromArray([array<string|int, mixed> $array = null ]) : static
This static function returns a new instance of this class.
If $array
is null
, null
is returned.
Parameters
- $array : array<string|int, mixed> = null
-
An array
Return values
static —An instance of this class.
fromJson()
Convert a JSON string into an instance of this class.
public
static fromJson(string $json) : static
This static function returns a new instance of this class.
If $json
is null
or the type of $json
is not string
,
null
is returned.
Parameters
- $json : string
-
A JSON string.
Return values
static —An instance of this class.
getClientCertificate()
Get the client certificate from the MTLS of the userinfo request from the client application.
public
getClientCertificate() : string
Tags
Return values
string —The client certificate.
getDpop()
Get the `DPoP` header presented by the client during the request to the userinfo endpoint. This header contains a signed JWT which includes the public key that is paired with the private key used to sign it.
public
getDpop() : string
See "OAuth 2.0 Demonstration of Proof-of-Possession at the Application Layer (DPoP)" for details.
Tags
Return values
string —The value of the DPoP
header.
getHtm()
Get the HTTP method of the userinfo request. This property is used to validate the `DPoP` header.
public
getHtm() : string
In normal cases, the value is either GET
or POST
.
See "OAuth 2.0 Demonstration of Proof-of-Possession at the Application Layer (DPoP)" for details.
Tags
Return values
string —The HTTP method. For example, GET
.
getHtu()
Get the URL of the userinfo endpoint. This property is used to validate the `DPoP` header.
public
getHtu() : string
If this request parameter is omitted, the userInfoEndpoint
property of
the Service
is used as the default value.
See "OAuth 2.0 Demonstration of Proof-of-Possession at the Application Layer (DPoP)" for details.
Tags
Return values
string —The URL of the token endpoint.
getToken()
Get the access token that the userinfo endpoint implementation received from the client application.
public
getToken() : string
Return values
string —The access token.
setClientCertificate()
Set the client certificate from the MTLS of the userinfo request from the client application.
public
setClientCertificate(string $certificate) : UserInfoRequest
Parameters
- $certificate : string
-
The client certificate.
Tags
Return values
UserInfoRequest —$this
object.
setDpop()
Set the `DPoP` header presented by the client during the request to the userinfo endpoint. This header contains a signed JWT which includes the public key that is paired with the private key used to sign it.
public
setDpop(string $dpop) : UserInfoRequest
See "OAuth 2.0 Demonstration of Proof-of-Possession at the Application Layer (DPoP)" for details.
Parameters
- $dpop : string
-
The value of the
DPoP
header.
Tags
Return values
UserInfoRequest —$this
object.
setHtm()
Set the HTTP method of the userinfo request. This property is used to validate the `DPoP` header.
public
setHtm(string $htm) : UeerInfoRequest
In normal cases, the value is either GET
or POST
.
See "OAuth 2.0 Demonstration of Proof-of-Possession at the Application Layer (DPoP)" for details.
Parameters
- $htm : string
-
The HTTP method. For example,
GET
.
Tags
Return values
UeerInfoRequest —$this
object.
setHtu()
Set the URL of the userinfo endpoint. This property is used to validate the `DPoP` header.
public
setHtu(string $htu) : UserInfoRequest
If this request parameter is omitted, the userInfoEndpoint
property of
the Service
is used as the default value.
See "OAuth 2.0 Demonstration of Proof-of-Possession at the Application Layer (DPoP)" for details.
Parameters
- $htu : string
-
The URL of the token endpoint.
Tags
Return values
UserInfoRequest —$this
object.
setToken()
Set the access token that the userinfo endpoint implementation received from the client application.
public
setToken(string $token) : UserInfoRequest
Parameters
- $token : string
-
The access token.
Return values
UserInfoRequest —$this
object.
toArray()
Convert this object into an array.
public
toArray() : array<string|int, mixed>
Return values
array<string|int, mixed> —An array.
toJson()
Convert this object into a JSON string.
public
toJson(int $options) : string
Parameters
- $options : int
-
Options passed to
json_encode()
. This parameter is optional and its default value is 0.
Return values
string —A JSON string.