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

x/oauth2_server/authorization_server.ts>AbstractGrant

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

Constructors

new
AbstractGrant(options: GrantOptions<Client, User, Scope>)

Type Parameters

Client extends ClientInterface
User
optional
Scope extends ScopeInterface = DefaultScope

Properties

allowRefreshToken: boolean

Allow optional refresh token. Defaults to false.

Methods

acceptedScope(
client: Client,
user: User,
scope?: Scope,
): Promise<Scope | null | undefined>
generateToken(
client: Client,
user: User,
scope?: Scope | null,
): Promise<Token<Client, User, Scope>>
parseScope(scopeText?: string | null): Scope | undefined
abstract
token(request: OAuth2Request<Client, User, Scope>, client: Client): Promise<Token<Client, User, Scope>>

Generates and saves a token.