Class ConfigurationRequestHandler
- java.lang.Object
-
- com.authlete.jaxrs.ConfigurationRequestHandler
-
public class ConfigurationRequestHandler extends Object
Handler for requests to an OpenID Provider configuration endpoint.An OpenID Provider that supports OpenID Connect Discovery 1.0 must provide an endpoint that returns its configuration information in a JSON format. Details about the format are described in "3. OpenID Provider Metadata" in OpenID Connect Discovery 1.0.
In an implementation of configuration endpoint, call
handle()
method and use the response as the response from the endpoint to the client application.Note that the URI of an OpenID Provider configuration endpoint is defined in "4.1. OpenID Provider Configuration Request" in OpenID Connect Discovery 1.0. 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, Seeissuer
in "3. OpenID Provider Metadata" (OpenID Connect Discovery 1.0) andiss
in "2. ID Token" (OpenID Connect Core 1.0).You can change the Issuer Identifier of your service using the management console (Service Owner Console). Note that the default value of Issuer Identifier is not appropriate for commercial use, so you should change it.
- Since:
- 1.1
- Author:
- Takahiko Kawasaki
-
-
Constructor Summary
Constructors Constructor Description ConfigurationRequestHandler(com.authlete.common.api.AuthleteApi api)
Constructor with an implementation ofAuthleteApi
interface.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.authlete.jaxrs.AuthleteApiCaller
getApiCaller()
javax.ws.rs.core.Response
handle()
Handle a request to an OpenID Provider configuration endpoint.javax.ws.rs.core.Response
handle(boolean pretty)
Handle a request to an OpenID Provider configuration endpoint.javax.ws.rs.core.Response
handle(com.authlete.common.dto.ServiceConfigurationRequest request)
Handle a request to an OpenID Provider configuration endpoint.protected javax.ws.rs.InternalServerErrorException
unexpected(String message, Throwable cause)
-
-
-
Method Detail
-
handle
public javax.ws.rs.core.Response handle() throws javax.ws.rs.WebApplicationException
Handle a request to an OpenID Provider configuration endpoint. This method is an alias ofhandle
(true)
.- Returns:
- A response that should be returned from the endpoint to the client application.
- Throws:
javax.ws.rs.WebApplicationException
- An error occurred.
-
handle
public javax.ws.rs.core.Response handle(boolean pretty) throws javax.ws.rs.WebApplicationException
Handle a request to an OpenID Provider configuration endpoint. This method internally calls Authlete's/api/service/configuration
API.- Parameters:
pretty
-true
to return the output JSON in pretty format.- Returns:
- A response that should be returned from the endpoint to the client application.
- Throws:
javax.ws.rs.WebApplicationException
- An error occurred.
-
handle
public javax.ws.rs.core.Response handle(com.authlete.common.dto.ServiceConfigurationRequest request) throws javax.ws.rs.WebApplicationException
Handle a request to an OpenID Provider configuration endpoint. This method internally calls Authlete's/api/service/configuration
API.- Parameters:
request
- Request parameters to the Authlete API.- Returns:
- A response that should be returned from the discovery endpoint.
- Throws:
javax.ws.rs.WebApplicationException
- An error occurred.- Since:
- 2.50
-
getApiCaller
protected com.authlete.jaxrs.AuthleteApiCaller getApiCaller()
-
-