easy-social-auth
Version:
A flexible, standalone package for social authentication using Google, Facebook & Twitter
22 lines (21 loc) • 1.37 kB
TypeScript
import { ISocialUser } from "../interfaces/social-user.interface";
import { ITwitterConfig } from "../interfaces/config.interface";
import { SocialAuthResponse } from "../interfaces/easy-social-auth-response.interface";
import { AuthStrategy } from "./easy-social-auth.strategy";
import { TokenTypeEnum } from "../enums/token-type.enum";
export declare class TwitterStrategy extends AuthStrategy {
private readonly config;
constructor(config: ITwitterConfig);
getUserData(accessToken: string): Promise<SocialAuthResponse<ISocialUser>>;
exchangeCodeForToken(code: string, redirectUri: string, additionalParams?: Record<string, string>, clientType?: "PUBLIC" | "CONFIDENTIAL"): Promise<SocialAuthResponse<any>>;
refreshAccessToken(refreshToken: string): Promise<SocialAuthResponse<string>>;
requestAppToken(scope: string, clientType?: string): Promise<SocialAuthResponse<string>>;
revokeAccessToken(token: string, token_type_hint?: TokenTypeEnum): Promise<SocialAuthResponse<any>>;
getRequestOAuth_1_0_Token(callbackUrl: string): Promise<SocialAuthResponse<any>>;
getAuthorizationUrl(oauthToken: string): string;
getOAuth_1_0_AccessToken(oauthToken: string, oauthVerifier: string): Promise<SocialAuthResponse<any>>;
private buildAuthHeader;
private generateNonce;
private generateTimestamp;
private generateSignature;
}