Package com.authlete.jaxrs
Class JwksRequestHandler
- java.lang.Object
-
- com.authlete.jaxrs.JwksRequestHandler
-
public class JwksRequestHandler extends Object
Handler for requests to an endpoint that exposes JSON Web Key Set (RFC 7517) 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. The URI of a JWK Set endpoint can be found as the value of
jwks_uri
in OpenID Provider Metadata, if the OP supports OpenID Connect Discovery 1.0.- Since:
- 1.1
- Author:
- Takahiko Kawasaki
-
-
Constructor Summary
Constructors Constructor Description JwksRequestHandler(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 a JWK Set endpoint.javax.ws.rs.core.Response
handle(boolean pretty)
Handle a request to a JWK Set 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 a JWK Set 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 a JWK Set endpoint. This method internally calls Authlete's/api/service/jwks/get
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.
-
getApiCaller
protected com.authlete.jaxrs.AuthleteApiCaller getApiCaller()
-
-