Package com.authlete.jaxrs
Class BaseUserInfoEndpoint
- java.lang.Object
-
- com.authlete.jaxrs.BaseEndpoint
-
- com.authlete.jaxrs.BaseResourceEndpoint
-
- com.authlete.jaxrs.BaseUserInfoEndpoint
-
public class BaseUserInfoEndpoint extends BaseResourceEndpoint
A base class for userinfo endpoints.- Since:
- 1.2
- Author:
- Takahiko Kawasaki
- See Also:
- OpenID Connect Core 1.0, 5.3. UserInfo Endpoint
-
-
Constructor Summary
Constructors Constructor Description BaseUserInfoEndpoint()
-
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, UserInfoRequestHandlerSpi spi, UserInfoRequestHandler.Params params)
Handle a userinfo request.javax.ws.rs.core.Response
handle(com.authlete.common.api.AuthleteApi api, UserInfoRequestHandlerSpi spi, String accessToken)
Handle a userinfo request.-
Methods inherited from class com.authlete.jaxrs.BaseResourceEndpoint
extractAccessToken, validateAccessToken, validateAccessToken, validateAccessToken, validateAccessToken, validateAccessToken, validateAccessToken
-
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, UserInfoRequestHandlerSpi spi, String accessToken)
Handle a userinfo request. This method is an alias of thehandle(AuthleteApi, UserInfoRequestHandlerSpi, UserInfoRequestHandler.Params)
method.- Parameters:
api
- An implementation ofAuthleteApi
.spi
- An implementation ofUserInfoRequestHandlerSpi
.accessToken
- An access token.- 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, UserInfoRequestHandlerSpi spi, UserInfoRequestHandler.Params params)
Handle a userinfo request.This method internally creates a
UserInfoRequestHandler
instance and calls itshandle(Params)
method. Then, this method uses the value returned from thehandle()
method as a response from this method.When
UserInfoRequestHandler.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
.spi
- An implementation ofUserInfoRequestHandlerSpi
.params
- Parameters needed to handle the userinfo request.- Returns:
- A response that should be returned to the client application.
- Since:
- 2.27
-
-