ConsoleAuthorizationHandler implements AuthorizationHandlerInterface
FinalYes
Prints the authorization URL and reads the redirected URL back, for a shell without a browser.
Tags
Table of Contents
Interfaces
- AuthorizationHandlerInterface
- Takes the user to the authorization endpoint and returns the answer of the authorization server.
Properties
Methods
- __construct() : mixed
- authorize() : array<string, string>
- Send the user to $authorizationUrl and return the query parameters of the redirect to $redirectUri, unchecked.
Properties
$input read-only
private
mixed
$input
= \STDIN
$output read-only
private
mixed
$output
= \STDERR
Methods
__construct()
public
__construct([resource $input = STDIN ][, resource $output = STDERR ]) : mixed
Parameters
- $input : resource = STDIN
-
stream the redirected URL is read from
- $output : resource = STDERR
-
stream the prompt is written to
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