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_uriin 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 ofAuthleteApiinterface.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.authlete.jaxrs.AuthleteApiCallergetApiCaller()javax.ws.rs.core.Responsehandle()Handle a request to a JWK Set endpoint.javax.ws.rs.core.Responsehandle(boolean pretty)Handle a request to a JWK Set endpoint.javax.ws.rs.core.Responsehandle(boolean pretty, com.authlete.common.api.Options options)Handle a request to a JWK Set endpoint.javax.ws.rs.core.Responsehandle(com.authlete.common.api.Options options)Handle a request to a JWK Set endpoint.protected javax.ws.rs.InternalServerErrorExceptionunexpected(String message, Throwable cause)
-
-
-
Method Detail
-
handle
public javax.ws.rs.core.Response handle() throws javax.ws.rs.WebApplicationExceptionHandle a request to a JWK Set endpoint. This method is an alias ofhandle(null).- 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.api.Options options) throws javax.ws.rs.WebApplicationExceptionHandle a request to a JWK Set endpoint. This method is an alias ofhandle(true, options).- Parameters:
options- The request options for the/api/service/jwks/getAPI.- Returns:
- A response that should be returned from the endpoint to the client application.
- Throws:
javax.ws.rs.WebApplicationException- An error occurred.- Since:
- 2.82
-
handle
public javax.ws.rs.core.Response handle(boolean pretty) throws javax.ws.rs.WebApplicationExceptionHandle a request to a JWK Set endpoint. This method is an alias ofhandle(pretty, null).- Parameters:
pretty-trueto 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(boolean pretty, com.authlete.common.api.Options options) throws javax.ws.rs.WebApplicationExceptionHandle a request to a JWK Set endpoint. This method internally calls Authlete's/api/service/jwks/getAPI.- Parameters:
pretty-trueto return the output JSON in pretty format.options- The request options for the/api/service/jwks/getAPI.- Returns:
- A response that should be returned from the endpoint to the client application.
- Throws:
javax.ws.rs.WebApplicationException- An error occurred.- Since:
- 2.82
-
getApiCaller
protected com.authlete.jaxrs.AuthleteApiCaller getApiCaller()
-
-