ClientRegistration implements JsonSerializable
FinalYes
The client's identity at one authorization server.
Tags
Table of Contents
Interfaces
- JsonSerializable
Properties
- $clientId : string
- $clientSecret : string|null
- $clientSecretExpiresAt : int|null
- $dynamic : bool
- $redirectUris : array<string|int, mixed>
- $scopes : array<string|int, mixed>|null
- $tokenEndpointAuthMethod : TokenEndpointAuthMethod
Methods
- __construct() : mixed
- fromArray() : self
- fromResponse() : self
- Build a registration from a parsed RFC 7591 registration response.
- isExpired() : bool
- jsonSerialize() : array<string, mixed>
- authMethod() : TokenEndpointAuthMethod|null
Properties
$clientId read-only
public
string
$clientId
$clientSecret read-only
public
string|null
$clientSecret
= null
$clientSecretExpiresAt read-only
public
int|null
$clientSecretExpiresAt
= null
$dynamic read-only
public
bool
$dynamic
= false
$redirectUris read-only
public
array<string|int, mixed>
$redirectUris
= []
$scopes read-only
public
array<string|int, mixed>|null
$scopes
= null
$tokenEndpointAuthMethod read-only
public
TokenEndpointAuthMethod
$tokenEndpointAuthMethod
= TokenEndpointAuthMethod::None
Methods
__construct()
public
__construct(string $clientId[, string|null $clientSecret = null ][, TokenEndpointAuthMethod $tokenEndpointAuthMethod = TokenEndpointAuthMethod::None ][, bool $dynamic = false ][, int|null $clientSecretExpiresAt = null ][, array<string|int, string> $redirectUris = [] ][, array<string|int, string>|null $scopes = null ]) : mixed
Parameters
- $clientId : string
-
the client identifier
- $clientSecret : string|null = null
-
the client secret, when the server issued one
- $tokenEndpointAuthMethod : TokenEndpointAuthMethod = TokenEndpointAuthMethod::None
-
how the client authenticates at the token endpoint
- $dynamic : bool = false
-
whether this came from dynamic client registration, and may therefore be re-created at will
- $clientSecretExpiresAt : int|null = null
-
unix timestamp the secret expires at, 0/null when it does not
- $redirectUris : array<string|int, string> = []
-
the redirect URIs this client was registered with, empty when unknown
- $scopes : array<string|int, string>|null = null
-
the scopes this client was registered for, null when it named none
fromArray()
public
static fromArray(array<string, mixed> $data) : self
Parameters
- $data : array<string, mixed>
Return values
selffromResponse()
Build a registration from a parsed RFC 7591 registration response.
public
static fromResponse(array<string, mixed> $response[, TokenEndpointAuthMethod $fallback = TokenEndpointAuthMethod::None ][, array<string|int, string> $redirectUris = [] ][, array<string|int, string>|null $scopes = null ]) : self
Parameters
- $response : array<string, mixed>
-
the parsed registration response
- $fallback : TokenEndpointAuthMethod = TokenEndpointAuthMethod::None
-
the method to assume when the server does not echo one back
- $redirectUris : array<string|int, string> = []
-
the redirect URIs that were registered
- $scopes : array<string|int, string>|null = null
-
the scopes that were registered
Return values
selfisExpired()
public
isExpired([int|null $now = null ]) : bool
Parameters
- $now : int|null = null
Return values
booljsonSerialize()
public
jsonSerialize() : array<string, mixed>
Return values
array<string, mixed>authMethod()
private
static authMethod(mixed $value) : TokenEndpointAuthMethod|null
Parameters
- $value : mixed