class ClientRegistrationController

Traits

Methods

mixed
withErrorHandling(Closure $callback)

Perform the given callback with exception handling.

mixed
withAuthorizationErrorHandling(Closure $callback, array $pending, AuthorizationResponse $responses)

Render authorization errors after rollback using the validated interaction context.

__construct(ClientMetadataValidator $metadata, ServerFactory $servers, AuthManager $auth, Repository $config, AuthenticationChallenge $challenges)

Create the dynamic client registration endpoint.

store(Request $request)

Register a client and return its effective metadata and new credentials.

provisioningToken(Request $request)

Require explicit provisioning scope when a caller supplies an access token.

bearerChallenge(Request $request, string|null $error = null, Throwable|null $previous = null)

Reject provisioning credentials with their protocol's status and challenge.

createClient(array $metadata, array $scopes, AccessToken|null $token, Request $request)

Persist validated metadata using the authenticated user's client relation when present.

Details

in HandlesOAuthErrors at line 25
protected mixed withErrorHandling(Closure $callback)

Perform the given callback with exception handling.

Parameters

Closure $callback

Return Value

mixed

Exceptions

OAuthServerException

in HandlesOAuthErrors at line 42
protected mixed withAuthorizationErrorHandling(Closure $callback, array $pending, AuthorizationResponse $responses)

Render authorization errors after rollback using the validated interaction context.

Parameters

Closure $callback
array $pending
AuthorizationResponse $responses

Return Value

mixed

at line 36
__construct(ClientMetadataValidator $metadata, ServerFactory $servers, AuthManager $auth, Repository $config, AuthenticationChallenge $challenges)

Create the dynamic client registration endpoint.

Parameters

ClientMetadataValidator $metadata
ServerFactory $servers
AuthManager $auth
Repository $config
AuthenticationChallenge $challenges

at line 48
JsonResponse store(Request $request)

Register a client and return its effective metadata and new credentials.

Parameters

Request $request

Return Value

JsonResponse

at line 112
protected AccessToken|null provisioningToken(Request $request)

Require explicit provisioning scope when a caller supplies an access token.

Parameters

Request $request

Return Value

AccessToken|null

at line 146
protected HttpResponseException bearerChallenge(Request $request, string|null $error = null, Throwable|null $previous = null)

Reject provisioning credentials with their protocol's status and challenge.

Parameters

Request $request
string|null $error
Throwable|null $previous

Return Value

HttpResponseException

at line 167
protected Client createClient(array $metadata, array $scopes, AccessToken|null $token, Request $request)

Persist validated metadata using the authenticated user's client relation when present.

Parameters

array $metadata
array $scopes
AccessToken|null $token
Request $request

Return Value

Client