src/main/java/com/authlete/jaxrs/AuthleteApiCaller.java
public Response tokenIssue(String ticket, String subject, Property[] properties)
    {
        // Call Authlete's /api/auth/token/issue API.
        TokenIssueResponse response = callTokenIssue(ticket, subject, properties);

        // 'action' in the response denotes the next action which
        // this service implementation should take.
        TokenIssueResponse.Action action = response.getAction();

        // The content of the response to the client application.
        String content = response.getResponseContent();

        // Dispatch according to the action.
        switch (action)
        {
            case INTERNAL_SERVER_ERROR:
                // 500 Internal Server Error
                return ResponseUtil.internalServerError(content);

            case OK:
                // 200 OK
                return ResponseUtil.ok(content);

            default:
                // This never happens.
                throw unknownAction("/api/auth/token/issue", action);
        }
    }
public Response tokenIssue(String ticket, String subject, Property[] properties)
    {
        // Call Authlete's /api/auth/token/issue API.
        TokenIssueResponse response = callTokenIssue(ticket, subject, properties);

        // 'action' in the response denotes the next action which
        // this service implementation should take.
        TokenIssueResponse.Action action = response.getAction();

        // The content of the response to the client application.
        String content = response.getResponseContent();

        // Dispatch according to the action.
        switch (action)
        {
            case INTERNAL_SERVER_ERROR:
                // 500 Internal Server Error
                return ResponseUtil.internalServerError(content);

            case OK:
                // 200 OK
                return ResponseUtil.ok(content);

            default:
                // This never happens.
                throw unknownAction("/api/auth/token/issue", action);
        }
    }
public Response tokenIssue ( String ticket , String subject , Property [ ] properties ) { // Call Authlete's /api/auth/token/issue API. TokenIssueResponse response = callTokenIssue ( ticket , subject , properties ) ; // 'action' in the response denotes the next action which // this service implementation should take. TokenIssueResponse . Action action = response . getAction ( ) ; // The content of the response to the client application. String content = response . getResponseContent ( ) ; // Dispatch according to the action. switch ( action ) { case INTERNAL_SERVER_ERROR : // 500 Internal Server Error return ResponseUtil . internalServerError ( content ) ; case OK : // 200 OK return ResponseUtil . ok ( content ) ; default : // This never happens. throw unknownAction ( "/api/auth/token/issue" , action ) ; } }
Issue an access token and optionally an ID token.
This method calls Authlete's {@code /api/auth/token/issue} API.
Issue an access token and optionally an ID token . This method calls Authlete s {