salesforce-jwt-promise
Version:
Promise Based SalesForce Auth 2.0 JWT Bearer Token Flow Implementation, written in typescript
20 lines (19 loc) • 451 B
TypeScript
export interface JWTResponse {
access_token: string;
scope: string;
instance_url: string;
id: string;
token_type: string;
}
export interface JWTError {
error: string;
error_description: string;
}
export interface JWTOptions {
clientId: string;
privateKey: string;
userName: string;
audience?: string;
instanceUrl?: string;
}
export declare const getJWTToken: (opts: JWTOptions) => Promise<JWTResponse>;