Package com.authlete.jaxrs
Class UserInfoRequestHandler
- java.lang.Object
-
- com.authlete.jaxrs.UserInfoRequestHandler
-
public class UserInfoRequestHandler extends Object
Handler for userinfo requests to a UserInfo Endpoint defined in OpenID Connect Core 1.0.In an implementation of userinfo endpoint, call one of
handle()
method variants and use the response as the response from the endpoint to the client application.handle()
method calls Authlete's/api/auth/userinfo
API and/api/auth/userinfo/issue
API.- Since:
- 1.2
- Author:
- Takahiko Kawasaki
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UserInfoRequestHandler.Params
Parameters passed to thehandle(Params)
method.
-
Constructor Summary
Constructors Constructor Description UserInfoRequestHandler(com.authlete.common.api.AuthleteApi api, UserInfoRequestHandlerSpi spi)
Constructor with an implementation ofAuthleteApi
interface and an implementation ofUserInfoRequestHandlerSpi
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(UserInfoRequestHandler.Params params)
Handle a userinfo request.javax.ws.rs.core.Response
handle(String accessToken)
Handle a userinfo request to a UserInfo Endpoint defined in OpenID Connect Core 1.0.protected javax.ws.rs.InternalServerErrorException
unexpected(String message, Throwable cause)
-
-
-
Constructor Detail
-
UserInfoRequestHandler
public UserInfoRequestHandler(com.authlete.common.api.AuthleteApi api, UserInfoRequestHandlerSpi spi)
Constructor with an implementation ofAuthleteApi
interface and an implementation ofUserInfoRequestHandlerSpi
interface.- Parameters:
api
- Implementation ofAuthleteApi
interface.spi
- Implementation ofUserInfoRequestHandlerSpi
interface.
-
-
Method Detail
-
handle
public javax.ws.rs.core.Response handle(String accessToken) throws javax.ws.rs.WebApplicationException
Handle a userinfo request to a UserInfo Endpoint defined in OpenID Connect Core 1.0.- Parameters:
accessToken
- An access token.- 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(UserInfoRequestHandler.Params params) throws javax.ws.rs.WebApplicationException
Handle a userinfo request.- Parameters:
params
- Parameters needed to handle the userinfo request.- 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()
-
-