UNPKG

abowire

Version:

This is the official **Abowire Javascript SDK**, which makes it easy to connect to the Abowire **GraphQL API** and includes all the required dependencies you need.

45 lines (44 loc) 1.41 kB
import { AuthConfig, Authentication, LoginOptions } from '../types'; import Keycloak from 'keycloak-js'; export declare class AuthorizationCodeAuthentication implements Authentication { protected options: AuthConfig; protected keycloak: Keycloak & { didInitialize?: boolean; }; protected useStorage: boolean; constructor(options: AuthConfig); getAccessToken(): Promise<string | undefined>; getKeycloak(): Promise<Keycloak & { didInitialize?: boolean | undefined; }>; getTokens(): Promise<{ accessToken: string | undefined; refreshToken: string | undefined; idToken: string | undefined; expiresIn: number | undefined; clientId: string | undefined; profile: { id: any; name: any; email: any; locale: any; }; } | undefined>; private getExpiration; login(options: LoginOptions): Promise<{ accessToken: string | undefined; refreshToken: string | undefined; idToken: string | undefined; expiresIn: number | undefined; clientId: string | undefined; profile: { id: any; name: any; email: any; locale: any; }; } | undefined>; getLoginUrl(options: LoginOptions): Promise<string>; renew(): Promise<void>; logout(): Promise<void>; }