DefinitelyTyped/types/express-oauth-server/index.d.ts
Nathan Shively-Sanders f0ce987bc1 Update project urls to match NPM url
Note that this *trivially* updates project urls by adding the NPM url to
the end, even when the urls are almost identical or the DT one is
outdated. I'll clean up the urls in a later commit.

This PR is unfinished! Please do not merge it yet.
2019-02-11 17:10:55 -08:00

35 lines
1.1 KiB
TypeScript

// Type definitions for express-oauth-server 2.0
// Project: https://github.com/oauthjs/express-oauth-server#readme, https://github.com/seegno/express-oauth-server
// Definitions by: Arne Schubert <https://github.com/atd-schubert>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
import * as express from 'express';
import * as OAuth2Server from 'oauth2-server';
declare class ExpressOAuthServer {
server: OAuth2Server;
constructor(options: OAuth2Server.ServerOptions);
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;