MCP PHP SDK

ConsoleAuthorizationHandler implements AuthorizationHandlerInterface

FinalYes

Prints the authorization URL and reads the redirected URL back, for a shell without a browser.

Tags
author

Christopher Hertel mail@christopher-hertel.de

Table of Contents

Interfaces

AuthorizationHandlerInterface
Takes the user to the authorization endpoint and returns the answer of the authorization server.

Properties

$input  : mixed
$output  : mixed

Methods

__construct()  : mixed
authorize()  : array<string, string>
Send the user to $authorizationUrl and return the query parameters of the redirect to $redirectUri, unchecked.

Properties

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

On this page

Search results