Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/oauth2_server/services/test_services.ts>AccessTokenService

A standards compliant implementation of an OAuth 2.0 authorization server with PKCE support.
Latest
class AccessTokenService
import { AccessTokenService } from "https://deno.land/x/oauth2_server@0.12.0/services/test_services.ts";

Constructors

new
AccessTokenService(options?: { client: Client; })

Methods

getToken(accessToken: string): Promise<AccessToken<Client, User, Scope> | undefined>

Retrieves an existing token by access token.

revoke(_token: string | Token<Client, User, Scope>): Promise<boolean>

Revokes a token.

revokeCode(_code: string): Promise<boolean>

Revokes all tokens generated from an authorization code.

save(token: Token<Client, User, Scope>): Promise<Token<Client, User, Scope>>

Saves a token.