Class BaseConfigurationEndpoint
- java.lang.Object
-
- com.authlete.jaxrs.BaseEndpoint
-
- com.authlete.jaxrs.BaseConfigurationEndpoint
-
public class BaseConfigurationEndpoint extends BaseEndpoint
A base class for OpenID Provider configuration endpoints.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.
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
- See Also:
- OpenID Connect Discovery 1.0
-
-
Constructor Summary
Constructors Constructor Description BaseConfigurationEndpoint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.Response
handle(com.authlete.common.api.AuthleteApi api)
Handle a request for OpenID Provider configuration.javax.ws.rs.core.Response
handle(com.authlete.common.api.AuthleteApi api, com.authlete.common.dto.ServiceConfigurationRequest request)
Handle a request for OpenID Provider configuration.-
Methods inherited from class com.authlete.jaxrs.BaseEndpoint
extractClientCertificate, extractClientCertificateChain, extractHeadersAsPairs, onError, takeAttribute
-
-
-
-
Method Detail
-
handle
public javax.ws.rs.core.Response handle(com.authlete.common.api.AuthleteApi api)
Handle a request for OpenID Provider configuration.This method internally creates a
ConfigurationRequestHandler
instance and calls itsConfigurationRequestHandler.handle()
method. Then, this method uses the value returned from thehandle()
method as a response from this method.When
ConfigurationRequestHandler.handle()
method raises aWebApplicationException
, this method callsonError()
method with the exception. The default implementation ofonError()
does nothing. You can override the method as necessary. After callingonError()
method, this method callsgetResponse()
method of the exception and uses the returned value as a response from this method.- Parameters:
api
- An implementation ofAuthleteApi
.- Returns:
- A response that should be returned to the client application.
-
handle
public javax.ws.rs.core.Response handle(com.authlete.common.api.AuthleteApi api, com.authlete.common.dto.ServiceConfigurationRequest request)
Handle a request for OpenID Provider configuration.This method internally creates a
ConfigurationRequestHandler
instance and calls itshandle
(
ServiceConfigurationRequest
)
method. Then, this method uses the value returned from the method as a response from this method.When handler's method raises a
WebApplicationException
, this method callsonError()
method with the exception. The default implementation ofonError()
does nothing. You can override the method as necessary. After callingonError()
method, this method callsgetResponse()
method of the exception and uses the returned value as a response from this method.- Parameters:
api
- An implementation ofAuthleteApi
.request
- Request parameters for Authlete's/service/configuration
API.- Returns:
- A response that should be returned from the discovery endpoint.
- Since:
- 2.50
-
-