Documentation

JwksRequestHandler extends BaseRequestHandler
in package

Handler for requests to an endpoint that exposes JSON Web Key Set document.

An OpenID Provider (OP) is required to expose its JSON Web Key Set document (JWK Set) so that client applications can (1) verify signatures by the OP and (2) encrypt their requests to the OP. See RFC 7517 for details about JWK Set.

The URI of a JWK Set document endpoint can be found as the value of the jwks_uri metadata which is defined in OpenID Provider Metadata if the OP supports OpenID Connect Discovery 1.0.

Table of Contents

Methods

__construct()  : mixed
Constructor with an implementation of the AuthleteApi interface.
getApi()  : AuthleteApi
Get the implementation of the AuthleteApi interface.
handle()  : Response
Handle a request to a JWK Set document endpoint.
unknownAction()  : Response
A utility method to generate a Response instance with "500 Internal Server Error" and an error message in JSON.

Methods

__construct()

Constructor with an implementation of the AuthleteApi interface.

public __construct(AuthleteApi $api) : mixed

The given value can be obtained later by calling getApi() method.

Parameters
$api : AuthleteApi

An implementation of the AuthleteApi interface.

getApi()

Get the implementation of the AuthleteApi interface.

public getApi() : AuthleteApi

The value returned from this method is the instance that was given to the constructor.

Return values
AuthleteApi

An implementation of the AuthleteApi interface.

handle()

Handle a request to a JWK Set document endpoint.

public handle([bool $pretty = true ]) : Response

This method calls Authlete's /api/service/jwks/get API.

Parameters
$pretty : bool = true

true to format the output JSON in a more human-readable way.

Tags
throws
AuthleteApiException
Return values
Response

An HTTP response that should be returned from the JWK Set document endpoint implementation to the client application.

unknownAction()

A utility method to generate a Response instance with "500 Internal Server Error" and an error message in JSON.

protected unknownAction(string $apiPath) : Response

This method is expected to be used when the value of the action parameter in a response from an Authlete API holds an unexpected value.

Parameters
$apiPath : string

The path of an Authlete API.

Return values
Response

A Response instahce which represents a server error.


        
On this page

Search results