Class BaseUserInfoEndpoint

    • Constructor Detail

      • BaseUserInfoEndpoint

        public BaseUserInfoEndpoint()
    • 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 handle(api, spi, accessToken, null, null).
        Parameters:
        api - An implementation of AuthleteApi.
        spi - An implementation of UserInfoRequestHandlerSpi.
        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,
                                                String accessToken,
                                                com.authlete.common.api.Options userInfoOptions,
                                                com.authlete.common.api.Options userInfoIssueOptions)
        Handle a userinfo request. This method is an alias of the handle(AuthleteApi, UserInfoRequestHandlerSpi, UserInfoRequestHandler.Params, Options, Options) method.
        Parameters:
        api - An implementation of AuthleteApi.
        spi - An implementation of UserInfoRequestHandlerSpi.
        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 to the client application.
        Since:
        2.82
      • 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 is an alias of handle(api, spi, params, null, null).
        Parameters:
        api - An implementation of AuthleteApi.
        spi - An implementation of UserInfoRequestHandlerSpi.
        params - Parameters needed to handle the userinfo request.
        Returns:
        A response that should be returned to the client application.
        Since:
        2.27
      • handle

        public javax.ws.rs.core.Response handle​(com.authlete.common.api.AuthleteApi api,
                                                UserInfoRequestHandlerSpi spi,
                                                UserInfoRequestHandler.Params params,
                                                com.authlete.common.api.Options userInfoOptions,
                                                com.authlete.common.api.Options userInfoIssueOptions)
        Handle a userinfo request.

        This method internally creates a UserInfoRequestHandler instance and calls its handle() method. Then, this method uses the value returned from the handle() method as a response from this method.

        When UserInfoRequestHandler.handle() method raises a WebApplicationException, this method calls onError() method with the exception. The default implementation of onError() does nothing. You can override the method as necessary. After calling onError() method, this method calls getResponse() method of the exception and uses the returned value as a response from this method.

        Parameters:
        api - An implementation of AuthleteApi.
        spi - An implementation of UserInfoRequestHandlerSpi.
        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 to the client application.
        Since:
        2.82