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/userinfoAPI and/api/auth/userinfo/issueAPI.- Since:
- 1.2
- Author:
- Takahiko Kawasaki
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classUserInfoRequestHandler.ParamsParameters passed to thehandle(Params)method.
-
Constructor Summary
Constructors Constructor Description UserInfoRequestHandler(com.authlete.common.api.AuthleteApi api, UserInfoRequestHandlerSpi spi)Constructor with an implementation ofAuthleteApiinterface and an implementation ofUserInfoRequestHandlerSpiinterface.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.authlete.jaxrs.AuthleteApiCallergetApiCaller()javax.ws.rs.core.Responsehandle(UserInfoRequestHandler.Params params)Handle a userinfo request to a UserInfo Endpoint defined in OpenID Connect Core 1.0.javax.ws.rs.core.Responsehandle(UserInfoRequestHandler.Params params, com.authlete.common.api.Options userInfoOptions, com.authlete.common.api.Options userInfoIssueOptions)Handle a userinfo request to a UserInfo Endpoint defined in OpenID Connect Core 1.0.javax.ws.rs.core.Responsehandle(String accessToken)Handle a userinfo request to a UserInfo Endpoint defined in OpenID Connect Core 1.0.javax.ws.rs.core.Responsehandle(String accessToken, com.authlete.common.api.Options userInfoOptions, com.authlete.common.api.Options userInfoIssueOptions)Handle a userinfo request to a UserInfo Endpoint defined in OpenID Connect Core 1.0.protected javax.ws.rs.InternalServerErrorExceptionunexpected(String message, Throwable cause)
-
-
-
Constructor Detail
-
UserInfoRequestHandler
public UserInfoRequestHandler(com.authlete.common.api.AuthleteApi api, UserInfoRequestHandlerSpi spi)Constructor with an implementation ofAuthleteApiinterface and an implementation ofUserInfoRequestHandlerSpiinterface.- Parameters:
api- Implementation ofAuthleteApiinterface.spi- Implementation ofUserInfoRequestHandlerSpiinterface.
-
-
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. This method is an alias ofhandle(accessToken, null, null).- 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(String accessToken, com.authlete.common.api.Options userInfoOptions, com.authlete.common.api.Options userInfoIssueOptions) throws javax.ws.rs.WebApplicationException
Handle a userinfo request to a UserInfo Endpoint defined in OpenID Connect Core 1.0. This method is an alias of thehandle(Params, Options, Options)method.- Parameters:
accessToken- An access token.userInfoOptions- The request options for the/api/auth/userinfoAPI.userInfoIssueOptions- The request options for the/api/auth/userinfo/issueAPI.- 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(UserInfoRequestHandler.Params params) throws javax.ws.rs.WebApplicationException
Handle a userinfo request to a UserInfo Endpoint defined in OpenID Connect Core 1.0. This method is an alias ofhandle(params, null, null).- 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.
-
handle
public javax.ws.rs.core.Response handle(UserInfoRequestHandler.Params params, com.authlete.common.api.Options userInfoOptions, com.authlete.common.api.Options userInfoIssueOptions) throws javax.ws.rs.WebApplicationException
Handle a userinfo request to a UserInfo Endpoint defined in OpenID Connect Core 1.0.- Parameters:
params- Parameters needed to handle the userinfo request.userInfoOptions- The request options for the/api/auth/userinfoAPI.userInfoIssueOptions- The request options for the/api/auth/userinfo/issueAPI.- 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()
-
-