import { AbstractAccessTokenService } from "https://deno.land/x/oauth2_server@0.12.0/authorization_server.ts";
Methods
acceptedScope(): Promise<>
Returns the accepted scope for the client and user.
accessTokenExpiresAt(): Promise<Date | undefined>
Gets the date that a new access token would expire at.
generateAccessToken(): Promise<string>
Generates an access token. Defaults to an RFC4122 v4 UUID (pseudo-randomly-based).
generateRefreshToken(): Promise<string | undefined>
Generates a refresh token. Not implemented by default.
getRefreshToken(_refreshToken: string): Promise<RefreshToken<Client, User, Scope> | undefined>
Retrieves an existing refresh token. Not implemented by default.
abstract
getToken(accessToken: string): Promise<AccessToken<Client, User, Scope> | undefined>Retrieves an existing access token.
refreshTokenExpiresAt(): Promise<Date | undefined>
Gets the date that a new refresh token would expire at. Not implemented by default.
abstract
revoke(token: AccessToken<Client, User, Scope>): Promise<boolean>Revokes a token. Resolves true if a token was revoked or invalid.
abstract
revoke(token: string, hint?: string | null): Promise<boolean>abstract
revokeCode(code: string): Promise<boolean>Revokes all tokens for an authorization code. Resolves true if a authorization code was revoked or invalid.
abstract
save(token: AccessToken<Client, User, Scope>): Promise<AccessToken<Client, User, Scope>>Saves a token.