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

x/oauth2_server/authorization_server.ts>GrantInterface

A standards compliant implementation of an OAuth 2.0 authorization server with PKCE support.
Latest
interface GrantInterface
Re-export
import { type GrantInterface } from "https://deno.land/x/oauth2_server@0.12.0/authorization_server.ts";

Type Parameters

Client extends ClientInterface
User
Scope extends ScopeInterface

Properties

allowRefreshToken: boolean

Methods

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