DeviceAuthorizationController
class DeviceAuthorizationController
Traits
Methods
Render authorization errors after rollback using the validated interaction context.
Resolve the guard authorizing the current request.
Get the name of the guard authorizing the current request.
Get the approving guard's user provider.
Capture the approving identity and synchronous extension decisions.
Ensure the consent belongs to the current user and provider.
Get the pending interaction selected by a browser decision.
Recheck the client and scopes saved with the consent request.
Create a new controller instance.
Authorize a device to access the user's account.
Transform the device code entity's scopes into Scope instances.
Details
in
HandlesOAuthErrors at line 25
protected mixed
withErrorHandling(Closure $callback)
Perform the given callback with exception handling.
in
HandlesOAuthErrors at line 42
protected mixed
withAuthorizationErrorHandling(Closure $callback, array $pending, AuthorizationResponse $responses)
Render authorization errors after rollback using the validated interaction context.
in
ResolvesApprovingGuard at line 28
protected StatefulGuard
getApprovingGuard()
Resolve the guard authorizing the current request.
in
ResolvesApprovingGuard at line 39
protected string
getApprovingGuardName()
Get the name of the guard authorizing the current request.
in
ResolvesApprovingGuard at line 47
protected string|null
getApprovingProvider()
Get the approving guard's user provider.
in
ResolvesApprovingGuard at line 59
protected array
authorizationState(Request $request, array $parameters, Authenticatable $user, Client $client, array $scopes, AuthorizationRequestInterface|DeviceCodeEntityInterface $authorization, Dispatcher $events)
Capture the approving identity and synchronous extension decisions.
in
ResolvesApprovingGuard at line 109
protected void
ensureApprovingUser(array $pending)
Ensure the consent belongs to the current user and provider.
in
ResolvesApprovingGuard at line 127
protected array
getPendingAuthorization(Request $request)
Get the pending interaction selected by a browser decision.
in
ResolvesApprovingGuard at line 143
protected Client
getClientForApproval(string $identifier, string $grantType, array $scopes)
Recheck the client and scopes saved with the consent request.
at line 33
__construct(AuthManager $auth, DeviceCodeRepository $deviceCodes, ClientRepository $clients, Repository $config, PendingAuthorizationRepository $pending, Dispatcher $events)
Create a new controller instance.
at line 46
RedirectResponse|DeviceAuthorizationViewResponse
__invoke(Request $request, DeviceAuthorizationViewResponse $viewResponse)
Authorize a device to access the user's account.
at line 103
protected array
parseScopes(DeviceCodeEntityInterface $deviceCode)
Transform the device code entity's scopes into Scope instances.