import { TokenResponse } from "https://deno.land/x/authlete_deno@v1.2.10/src/dto/token_response.ts";
const { Action } = TokenResponse;
The next action that the service implementation should take.
Members
The token request from the client was wrong. The service
implementation should return '400 Bad Request'
to the
client application.
The request from the service was wrong or an error occurred
in Authlete. The service implementation should return '500 Internal Server Error'
to the client application.
Authentication of the client application failed. The service
implementation should return either "400 Bad Request"
or
"401 Unauthorized"
to the client application.
The token request from the client was valid. The service
implementation should return '200 OK'
to the client application
with an access token.
The token request from the client application was valid and
the grant type is password
. The service implementation
should validate the credentials of the resource owner and call
Authlete /auth/token/issue
API or /auth/token/fail
API
according to the result of the validation.
The token request from the client was a valid token exchange request. The service implementation should take necessary actions (e.g. create an access token), generate a response and return it to the client application.
For more details, see RFC 8693 OAuth 2.0 Token Exchange.