Documentation

ConfigurationRequestHandler extends BaseRequestHandler
in package

Handler for requests to a configuration endpoint.

An OpenID provider that supports OpenID Connect Discovery 1.0 provides an endpoint that returns its configuration information in JSON format. Details about the format are described in 3. OpenID Provider Metadata of OpenID Connect Discovery 1.0.

Note that the URI of an OpenID provider configuration endpoint is defined in 4.1. OpenID Provider Configuration Request. In short, the URI must be:

{Issuer-Identifier}/.well-known/openid-configuration

"{Issuer-Identifier}" is a URL to identify an OpenID provider. For example, https://example.com. For details about Issuer Identifier, see the description about the issuer metadata defined in 3. OpenID Provider Metadata of OpenID Connect Discovery 1.0 and the iss claim in 2. ID Token of OpenID Connect Core 1.0.

You can change the Issuer Identifier of your service by using the management console (Service Owner Console). Note that the default value of Issuer Identifier is not appropriate for production use, so you should change it.

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 configuration 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 configuration endpoint.

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

This method calls Authlete's /api/service/configuration API.

Parameters
$pretty : bool = true

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

Tags
throws
AuthleteApiException
Return values
Response

A HTTP response that should be returned from the configuration 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