class AuthorizationRequiredException extends OAuthException

Methods

__construct(string $message = 'Authorization is required to access the MCP server.', WwwAuthenticateChallenge|null $challenge = null)

Create an authorization failure with its server challenge.

string|null
resourceMetadataUrl()

Get the resource metadata URL from the challenge.

string|null
scope()

Get the requested authorization scope.

array
query()

Get the authorization query parameters.

Details

at line 14
__construct(string $message = 'Authorization is required to access the MCP server.', WwwAuthenticateChallenge|null $challenge = null)

Create an authorization failure with its server challenge.

Parameters

string $message
WwwAuthenticateChallenge|null $challenge

at line 24
string|null resourceMetadataUrl()

Get the resource metadata URL from the challenge.

Return Value

string|null

at line 32
string|null scope()

Get the requested authorization scope.

Return Value

string|null

at line 42
array query()

Get the authorization query parameters.

Return Value

array