UNPKG

ng-ebi-authorization

Version:

The ng-ebi-authorization is a simple authentication Angular library that relies on EBI's Authentication and Authorization Profile (AAP) infrastructure. After successful login, a JWT token is stored on the browser (via cookie, local or session storage).

13 lines (12 loc) 463 B
import { InjectionToken } from '@angular/core'; export interface AuthConfig { aapURL: string; tokenGetter: () => string; tokenRemover?: () => void; tokenUpdater: (newToken: any) => void; } export declare const AAP_CONFIG: InjectionToken<AuthConfig>; export declare function getToken(): string; export declare function removeToken(): void; export declare function updateToken(newToken: string): void; export declare const DEFAULT_CONF: AuthConfig;