electron-authentication-hatena
Version:
Hatena OAuth Window library.
27 lines (26 loc) • 777 B
TypeScript
import { OAuth } from "oauth";
declare const OAuthProvider: {
requestTokenURL: string;
accessTokenURL: string;
authorizeURL: string;
};
export interface AuthenticationWindowOption {
key: string;
secret: string;
scopes: string[];
provider: typeof OAuthProvider;
redirectURL: string;
}
export declare class AuthenticationHatena {
private consumerKey;
private consumerSecret;
private OAuthProvider;
private resolve;
private reject;
private window;
private redirectURL;
constructor({ key, secret, scopes, provider, redirectURL }: AuthenticationWindowOption);
startRequest(): Promise<{}>;
getAccessToken(oauth: OAuth, requestToken: string, requestTokenSecret: string, authorizeURL: string): void;
}
export {};