@aca-1/a2-composer
Version:
Angular 2 Interface for composer
64 lines (63 loc) • 1.95 kB
TypeScript
import { Location } from '@angular/common';
import { DataStoreService } from '../data-store.service';
export declare class OAuthService {
private location;
private store;
clientId: string;
redirectUri: string;
loginUrl: string;
loginRedirect: string;
scope: string;
rngUrl: string;
oidc: boolean;
options: any;
state: string;
issuer: string;
validationHandler: any;
logoutUrl: string;
response_type: string;
refreshUri: string;
code: string;
login_local: boolean;
login_obs: any;
private _login_obs;
private debug;
private _storage;
private run_flow;
private needs_login;
private access_token_promise;
private refresh_token_promise;
private valid_access_token_promise;
private valid_id_token_promise;
private auth_header_promise;
constructor(location: Location, store: DataStoreService);
setStorage(storage: string): void;
readonly login_url: Promise<any>;
readonly refresh_url: Promise<any>;
needsLogin(): any;
tryLogin(options?: any): Promise<{}>;
tryLoginWithIFrame(): void;
tryRefresh(timeoutInMsec: any): void;
getIdentityClaims(): any;
getIdToken(): any;
getAccessToken(): any;
getRefreshToken(): any;
hasValidAccessToken(): any;
hasValidIdToken(): void;
authorizationHeader(): any;
logOut(): void;
clearAuth(): void;
private createLoginUrl(state);
private createRefreshUrl(state);
private initImplicitFlow(additionalState?);
private callEventIfExists(options);
private attemptLogin(options, resolve, reject);
private processLogin(parts, options, resolve, reject);
private processIdToken(idToken, accessToken);
private padBase64(base64data);
private createAndSaveNonce();
private createNonce();
private getFragment();
private parseQueryString(queryString);
private checkAtHash(accessToken, idClaims);
}