UNPKG

electron-oauth-helper

Version:

Easy to use helper library for OAuth1 and OAuth2.

36 lines 1.64 kB
export declare type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>; export declare type OAuthFlowType = "code" | "token" | "password" | "client_credentials"; export declare type OAuthConfigType = { response_type?: "code" | "token" | "password" | string; grant_type?: "authorization_code" | "password" | "client_credentials" | string; scope?: string; client_id?: string; client_secret?: string; authorize_url?: string; access_token_url?: string; redirect_uri?: string; username?: string; password?: string; code?: string; state?: string; }; export declare type AuthorizationCodeGrantConfig = Required<Pick<OAuthConfigType, "authorize_url" | "access_token_url" | "client_id" | "redirect_uri">> & Pick<OAuthConfigType, "state" | "client_secret">; export declare type AccessTokenRequestParameter = { grant_type: "authorization_code"; code: string; redirect_uri: string; client_id: string; client_secret?: string; state?: string; }; export declare type ImplicitGrantConfig = Required<Pick<OAuthConfigType, "authorize_url" | "response_type" | "client_id" | "redirect_uri">>; export declare type ResourceOwnerPasswordCredentialsGrantConfig = Required<Pick<OAuthConfigType, "access_token_url" | "response_type" | "username" | "password">>; export declare type ClientCredentialsGrantConfig = Required<Pick<OAuthConfigType, "grant_type" | "access_token_url">>; export declare type WindowOptions = { userAgent?: string; }; export declare class EOHError extends Error { query?: string; constructor(message?: string); } //# sourceMappingURL=index.d.ts.map