DefinitelyTyped/types/oauth2-implicit/index.d.ts
Max Boguslavsky c9e2ebd317 Added types for oauth2-implicit package (#38725)
* added rollup-plugin-peer-deps-external

* fixed error

* added oauth2-implicit

* corrected formatting

* removed unused files

* corrected version
2019-10-02 13:36:30 -07:00

35 lines
1.0 KiB
TypeScript

// Type definitions for oauth2-implicit 0.7
// Project: https://github.com/jasonkuhrt/oauth2-implicit
// Definitions by: Vladimir Grenaderov <https://github.com/VladimirGrenaderov>,
// Max Boguslavskiy <https://github.com/maxbogus>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export interface AuthState {
[key: string]: any;
originalUrl: string;
}
export interface AuthParams {
auth_uri: string;
client_id: string;
state: AuthState;
redirect_uri: string;
scope?: string[];
}
export interface AuthResult {
accessToken: string;
state: AuthState;
}
export function finish(): AuthResult | undefined | null;
export function parseCredentials(hashString: string): AuthParams;
export function run(options: any): any;
export function start(options: AuthParams): void;
export namespace run {
function finish(): AuthResult | undefined | null;
function parseCredentials(hashString: string): AuthParams;
function start(options: AuthParams): void;
}