IndieAuth
Namespaces
Interfaces, Classes and Traits
- IndieAuthException
- Server
- IndieAuth Server
Table of Contents
- generateRandomString() : mixed
- generateRandomPrintableAsciiString() : mixed
- generatePKCECodeChallenge() : mixed
- base64_urlencode() : mixed
- hashAuthorizationRequestParameters() : string|null
- isIndieAuthAuthorizationCodeRedeemingRequest() : mixed
- isIndieAuthAuthorizationRequest() : mixed
- isAuthorizationApprovalRequest() : mixed
- buildQueryString() : mixed
- urlComponentsMatch() : bool
- appendQueryParams() : mixed
- Append Query Parameters
- trySetLogger() : mixed
- Try setLogger
- renderTemplate() : mixed
- isClientIdentifier() : bool
- Check if a provided string matches the IndieAuth criteria for a Client Identifier.
- isProfileUrl() : bool
- Check if a provided string matches the IndieAuth criteria for a User Profile URL.
- isValidState() : bool
- OAuth 2.0 limits what values are valid for state.
- isValidCodeChallenge() : bool
- IndieAuth requires PKCE. This implementation supports only S256 for hashing.
- isValidScope() : bool
- OAuth 2.0 limits what values are valid for scope.
Functions
generateRandomString()
generateRandomString(mixed $numBytes) : mixed
Parameters
- $numBytes : mixed
generateRandomPrintableAsciiString()
generateRandomPrintableAsciiString(int $length) : mixed
Parameters
- $length : int
generatePKCECodeChallenge()
generatePKCECodeChallenge(mixed $plaintext) : mixed
Parameters
- $plaintext : mixed
base64_urlencode()
base64_urlencode(mixed $string) : mixed
Parameters
- $string : mixed
hashAuthorizationRequestParameters()
hashAuthorizationRequestParameters(ServerRequestInterface $request, string $secret[, string|null $algo = null ][, array<string|int, mixed>|null $hashedParameters = null ]) : string|null
Parameters
- $request : ServerRequestInterface
- $secret : string
- $algo : string|null = null
- $hashedParameters : array<string|int, mixed>|null = null
isIndieAuthAuthorizationCodeRedeemingRequest()
isIndieAuthAuthorizationCodeRedeemingRequest(ServerRequestInterface $request) : mixed
Parameters
- $request : ServerRequestInterface
isIndieAuthAuthorizationRequest()
isIndieAuthAuthorizationRequest(ServerRequestInterface $request[, mixed $permittedMethods = ['get'] ]) : mixed
Parameters
- $request : ServerRequestInterface
- $permittedMethods : mixed = ['get']
isAuthorizationApprovalRequest()
isAuthorizationApprovalRequest(ServerRequestInterface $request) : mixed
Parameters
- $request : ServerRequestInterface
buildQueryString()
buildQueryString(array<string|int, mixed> $parameters) : mixed
Parameters
- $parameters : array<string|int, mixed>
urlComponentsMatch()
urlComponentsMatch(mixed $url1, mixed $url2[, array<string|int, mixed>|null $components = null ]) : bool
Parameters
- $url1 : mixed
- $url2 : mixed
- $components : array<string|int, mixed>|null = null
appendQueryParams()
Append Query Parameters
appendQueryParams(string $uri, array<string|int, mixed> $queryParams) : mixed
Converts $queryParams
into a query string, then checks $uri
for an
existing query string. Then appends the newly generated query string
with either ? or & as appropriate.
Parameters
- $uri : string
- $queryParams : array<string|int, mixed>
trySetLogger()
Try setLogger
trySetLogger(mixed $target, LoggerInterface $logger) : mixed
If $target
implements LoggerAwareInterface
, set it’s logger
to $logger
. Returns $target
.
Parameters
- $target : mixed
- $logger : LoggerInterface
renderTemplate()
renderTemplate(string $template[, array<string|int, mixed> $context = [] ]) : mixed
Parameters
- $template : string
- $context : array<string|int, mixed> = []
isClientIdentifier()
Check if a provided string matches the IndieAuth criteria for a Client Identifier.
isClientIdentifier(string $client_id) : bool
Parameters
- $client_id : string
-
The client ID provided by the OAuth Client
Tags
isProfileUrl()
Check if a provided string matches the IndieAuth criteria for a User Profile URL.
isProfileUrl(string $profile_url) : bool
Parameters
- $profile_url : string
-
The profile URL provided by the IndieAuth Client as me
Tags
isValidState()
OAuth 2.0 limits what values are valid for state.
isValidState(string $state) : bool
We check this first, because if valid, we want to send it along with other errors.
Parameters
- $state : string
Tags
isValidCodeChallenge()
IndieAuth requires PKCE. This implementation supports only S256 for hashing.
isValidCodeChallenge(string $challenge) : bool
Parameters
- $challenge : string
Tags
isValidScope()
OAuth 2.0 limits what values are valid for scope.
isValidScope(string $scope) : bool
Parameters
- $scope : string