HeadlessAuthorizationHandler implements AuthorizationHandlerInterface
FinalYes
Requests the authorization endpoint itself and reads the code from the redirect, for servers that grant without a prompt.
Tags
Table of Contents
Interfaces
- AuthorizationHandlerInterface
- Takes the user to the authorization endpoint and returns the answer of the authorization server.
Properties
- $httpClient : ClientInterface
- $logger : LoggerInterface
- $requestFactory : RequestFactoryInterface
Methods
- __construct() : mixed
- authorize() : array<string, string>
- Send the user to $authorizationUrl and return the query parameters of the redirect to $redirectUri, unchecked.
- fetchRedirect() : string
Properties
$httpClient read-only
private
ClientInterface
$httpClient
$logger read-only
private
LoggerInterface
$logger
= new NullLogger()
$requestFactory read-only
private
RequestFactoryInterface
$requestFactory
Methods
__construct()
public
__construct([ClientInterface|null $httpClient = null ][, RequestFactoryInterface|null $requestFactory = null ][, LoggerInterface $logger = new NullLogger() ]) : mixed
Parameters
- $httpClient : ClientInterface|null = null
-
the client for the request, which must not follow redirects, so pass the one given to OAuth::setHttpClient()
- $requestFactory : RequestFactoryInterface|null = null
- $logger : LoggerInterface = new NullLogger()
authorize()
Send the user to $authorizationUrl and return the query parameters of the redirect to $redirectUri, unchecked.
public
authorize(string $authorizationUrl, string $redirectUri) : array<string, string>
Parameters
- $authorizationUrl : string
- $redirectUri : string
Return values
array<string, string> —the callback's query parameters
fetchRedirect()
private
fetchRedirect(string $url) : string
Parameters
- $url : string