import { AuthorizationServer } from "https://deno.land/x/oauth2_server@0.12.0/examples/oak-localstorage/deps.ts";
Methods
authorize<Request extends OAuth2Request<Client, User, Scope>, AuthorizeRequest extends OAuth2AuthorizeRequest<Client, User, Scope>, Response extends OAuth2Response>(): Promise<void>
request: Request,
response: Response,
setAuthorization: (request: AuthorizeRequest) => Promise<void>,
login: (request: AuthorizeRequest, response: Response) => Promise<void>,
consent?: (request: AuthorizeRequest, response: Response) => Promise<void>,
Authorizes a token request for the authorization code grant type.
authorizeError<Request extends OAuth2Request<Client, User, Scope>, AuthorizeRequest extends OAuth2AuthorizeRequest<Client, User, Scope>, Response extends OAuth2Response>(): Promise<void>
request: Request,
response: Response,
error: OAuth2Error,
login: (request: AuthorizeRequest, response: Response) => Promise<void>,
consent?: (request: AuthorizeRequest, response: Response) => Promise<void>,
Handles the response for an unauthorized request.
authorizeSuccess<Request extends OAuth2AuthorizedRequest<Client, User, Scope>, Response extends OAuth2Response>(request: Request, response: Response): Promise<void>
Handles the response for an authorization request.
token(request: OAuth2Request<Client, User, Scope>, response: OAuth2Response): Promise<void>
Handles a token request.
tokenError(): Promise<void>
Handles the response for an unsuccessful token request.
tokenResponse(_request: OAuth2Request<Client, User, Scope>, response: OAuth2Response): Promise<void>
Adds headers to the token response.
tokenSuccess(request: OAuth2AuthenticatedRequest<Client, User, Scope>, response: OAuth2Response): Promise<void>
Handles the response for a successful token request.