forked from oauthjs/express-oauth-server
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathindex.d.ts
47 lines (39 loc) · 1.28 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Type definitions for @node-oauth/express-oauth-server 3.0.0
// Project: https://github.com/node-oauth/express-oauth-server
// Definitions by: Arne Schubert <https://github.com/atd-schubert>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
import * as express from "express";
import * as OAuth2Server from "@node-oauth/oauth2-server";
declare namespace ExpressOAuthServer {
interface Options extends OAuth2Server.ServerOptions {
useErrorHandler?: boolean | undefined;
continueMiddleware?: boolean | undefined;
}
}
declare class ExpressOAuthServer {
server: OAuth2Server;
constructor(options: ExpressOAuthServer.Options);
authenticate(
options?: OAuth2Server.AuthenticateOptions
): (
request: express.Request,
response: express.Response,
next: express.NextFunction
) => Promise<OAuth2Server.Token>;
authorize(
options?: OAuth2Server.AuthorizeOptions
): (
request: express.Request,
response: express.Response,
next: express.NextFunction
) => Promise<OAuth2Server.AuthorizationCode>;
token(
options?: OAuth2Server.TokenOptions
): (
request: express.Request,
response: express.Response,
next: express.NextFunction
) => Promise<OAuth2Server.Token>;
}
export = ExpressOAuthServer;