Documentation

IndieAuthException extends Exception

Table of Contents

AUTHENTICATION_CALLBACK_MISSING_ME_PARAM  = 2
AUTHORIZATION_APPROVAL_REQUEST_INVALID_HASH  = 4
AUTHORIZATION_APPROVAL_REQUEST_MISSING_HASH  = 3
EXC_INFO  = [ self::INTERNAL_ERROR => ['statusCode' => 500, 'name' => 'Internal Server Error', 'explanation' => 'An internal server error occurred.'], self::INTERNAL_ERROR_REDIRECT => ['statusCode' => 302, 'name' => 'Internal Server Error', 'error' => 'internal_error'], self::AUTHENTICATION_CALLBACK_MISSING_ME_PARAM => ['statusCode' => 302, 'name' => 'Internal Server Error', 'error' => 'internal_error'], self::AUTHORIZATION_APPROVAL_REQUEST_MISSING_HASH => ['statusCode' => 302, 'name' => 'Request Missing Hash', 'error' => 'internal_error'], self::AUTHORIZATION_APPROVAL_REQUEST_INVALID_HASH => ['statusCode' => 302, 'name' => 'Request Hash Invalid', 'error' => 'internal_error'], // TODO: should this one be a 500 because it’s an internal server error, or a 400 because the client_id was likely invalid? Is anyone ever going to notice, or care? self::HTTP_EXCEPTION_FETCHING_CLIENT_ID => ['statusCode' => 500, 'name' => 'Error Fetching Client App URL', 'explanation' => 'Fetching the client app (client_id) failed.'], self::INTERNAL_EXCEPTION_FETCHING_CLIENT_ID => ['statusCode' => 500, 'name' => 'Internal Error fetching client app URI', 'explanation' => 'Fetching the client app (client_id) failed due to an internal error.'], self::INVALID_REDIRECT_URI => ['statusCode' => 400, 'name' => 'Invalid Client App Redirect URI', 'explanation' => 'The client app redirect URI (redirect_uri) either was not a valid URI, did not sufficiently match client_id, or did not exactly match any redirect URIs parsed from fetching the client_id.'], self::INVALID_CLIENT_ID => ['statusCode' => 400, 'name' => 'Invalid Client Identifier URI', 'explanation' => 'The Client Identifier was not valid.'], self::INVALID_STATE => ['statusCode' => 302, 'name' => 'Invalid state Parameter', 'error' => 'invalid_request'], self::INVALID_CODE_CHALLENGE => ['statusCode' => 302, 'name' => 'Invalid code_challenge Parameter', 'error' => 'invalid_request'], self::INVALID_SCOPE => ['statusCode' => 302, 'name' => 'Invalid scope Parameter', 'error' => 'invalid_request'], self::INVALID_GRANT => ['statusCode' => 400, 'name' => 'The provided credentials were not valid.', 'error' => 'invalid_grant'], self::INVALID_REQUEST => ['statusCode' => 400, 'name' => 'Invalid Request', 'error' => 'invalid_request'], self::INVALID_REQUEST_REDIRECT => ['statusCode' => 302, 'name' => 'Invalid Request', 'error' => 'invalid_request'], ]
HTTP_EXCEPTION_FETCHING_CLIENT_ID  = 5
INTERNAL_ERROR  = 0
INTERNAL_ERROR_REDIRECT  = 1
INTERNAL_EXCEPTION_FETCHING_CLIENT_ID  = 6
INVALID_CLIENT_ID  = 8
INVALID_CODE_CHALLENGE  = 10
INVALID_GRANT  = 12
INVALID_REDIRECT_URI  = 7
INVALID_REQUEST  = 13
INVALID_REQUEST_REDIRECT  = 14
INVALID_SCOPE  = 11
INVALID_STATE  = 9
$request  : ServerRequestInterface
create()  : self
getExplanation()  : mixed
getInfo()  : mixed
getRequest()  : mixed
getStatusCode()  : mixed
trustQueryParams()  : mixed
Trust Query Params

Constants

AUTHENTICATION_CALLBACK_MISSING_ME_PARAM

public mixed AUTHENTICATION_CALLBACK_MISSING_ME_PARAM = 2

AUTHORIZATION_APPROVAL_REQUEST_INVALID_HASH

public mixed AUTHORIZATION_APPROVAL_REQUEST_INVALID_HASH = 4

AUTHORIZATION_APPROVAL_REQUEST_MISSING_HASH

public mixed AUTHORIZATION_APPROVAL_REQUEST_MISSING_HASH = 3

EXC_INFO

public mixed EXC_INFO = [ self::INTERNAL_ERROR => ['statusCode' => 500, 'name' => 'Internal Server Error', 'explanation' => 'An internal server error occurred.'], self::INTERNAL_ERROR_REDIRECT => ['statusCode' => 302, 'name' => 'Internal Server Error', 'error' => 'internal_error'], self::AUTHENTICATION_CALLBACK_MISSING_ME_PARAM => ['statusCode' => 302, 'name' => 'Internal Server Error', 'error' => 'internal_error'], self::AUTHORIZATION_APPROVAL_REQUEST_MISSING_HASH => ['statusCode' => 302, 'name' => 'Request Missing Hash', 'error' => 'internal_error'], self::AUTHORIZATION_APPROVAL_REQUEST_INVALID_HASH => ['statusCode' => 302, 'name' => 'Request Hash Invalid', 'error' => 'internal_error'], // TODO: should this one be a 500 because it’s an internal server error, or a 400 because the client_id was likely invalid? Is anyone ever going to notice, or care? self::HTTP_EXCEPTION_FETCHING_CLIENT_ID => ['statusCode' => 500, 'name' => 'Error Fetching Client App URL', 'explanation' => 'Fetching the client app (client_id) failed.'], self::INTERNAL_EXCEPTION_FETCHING_CLIENT_ID => ['statusCode' => 500, 'name' => 'Internal Error fetching client app URI', 'explanation' => 'Fetching the client app (client_id) failed due to an internal error.'], self::INVALID_REDIRECT_URI => ['statusCode' => 400, 'name' => 'Invalid Client App Redirect URI', 'explanation' => 'The client app redirect URI (redirect_uri) either was not a valid URI, did not sufficiently match client_id, or did not exactly match any redirect URIs parsed from fetching the client_id.'], self::INVALID_CLIENT_ID => ['statusCode' => 400, 'name' => 'Invalid Client Identifier URI', 'explanation' => 'The Client Identifier was not valid.'], self::INVALID_STATE => ['statusCode' => 302, 'name' => 'Invalid state Parameter', 'error' => 'invalid_request'], self::INVALID_CODE_CHALLENGE => ['statusCode' => 302, 'name' => 'Invalid code_challenge Parameter', 'error' => 'invalid_request'], self::INVALID_SCOPE => ['statusCode' => 302, 'name' => 'Invalid scope Parameter', 'error' => 'invalid_request'], self::INVALID_GRANT => ['statusCode' => 400, 'name' => 'The provided credentials were not valid.', 'error' => 'invalid_grant'], self::INVALID_REQUEST => ['statusCode' => 400, 'name' => 'Invalid Request', 'error' => 'invalid_request'], self::INVALID_REQUEST_REDIRECT => ['statusCode' => 302, 'name' => 'Invalid Request', 'error' => 'invalid_request'], ]

HTTP_EXCEPTION_FETCHING_CLIENT_ID

public mixed HTTP_EXCEPTION_FETCHING_CLIENT_ID = 5

INTERNAL_EXCEPTION_FETCHING_CLIENT_ID

public mixed INTERNAL_EXCEPTION_FETCHING_CLIENT_ID = 6

Properties

Methods

create()

public static create(int $code, ServerRequestInterface $request[, Throwable|null $previous = null ]) : self
Parameters
$code : int
$request : ServerRequestInterface
$previous : Throwable|null = null
Return values
self

trustQueryParams()

Trust Query Params

public trustQueryParams() : mixed

Only useful on authorization form submission requests. If this returns false, the client_id and/or request_uri have likely been tampered with, and the error page SHOULD NOT offer the user a link to them.

Return values
mixed

Search results