Class 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
    • Constructor Detail

    • 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 of handle(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 the handle(Params, Options, Options) method.
        Parameters:
        accessToken - An access token.
        userInfoOptions - The request options for the /api/auth/userinfo API.
        userInfoIssueOptions - The request options for the /api/auth/userinfo/issue API.
        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 of handle (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/userinfo API.
        userInfoIssueOptions - The request options for the /api/auth/userinfo/issue API.
        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()
      • unexpected

        protected javax.ws.rs.InternalServerErrorException unexpected​(String message,
                                                                      Throwable cause)