Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Go to Latest
namespace TokenRequestHandler
import { TokenRequestHandler } from "https://deno.land/x/authlete_deno@v1.2.3/mod.ts";

Interfaces

Input parameters for the handle() method of TokenRequestHandler class.

class TokenRequestHandler
import { TokenRequestHandler } from "https://deno.land/x/authlete_deno@v1.2.3/mod.ts";

Handler for token requests to a token endpoint of OAuth 2.0 (RFC 6749).

In an implementation of token 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 /api/auth/token API, receives a response from the API, and dispatches processing according to the action parameter in the response.

Constructors

new
TokenRequestHandler(api: AuthleteApi, spi: TokenRequestHandlerSpi)

The constructor.

Properties

The SPI class for this handler.

Methods

private
callTokenFail(ticket: string, reason: Reason)
private
callTokenIssue(ticket: string, subject: string)
private
handlePassword(response: TokenResponse)
private
tokenFail(ticket: string, reason: Reason)
private
tokenIssue(ticket: string, subject: string)

Handle a token request to a token endpoint. This method calls Authlete /api/auth/token API and conditionally /api/auth/token/issue API or /api/token/issue/fail API.