UNPKG

1.43 kBTypeScriptView Raw
1import { ICredentials } from './types';
2export declare class CredentialsClass {
3 private _config;
4 private _credentials;
5 private _credentials_source;
6 private _gettingCredPromise;
7 private _refreshHandlers;
8 private _storage;
9 private _storageSync;
10 private _identityId;
11 private _nextCredentialsRefresh;
12 Auth: any;
13 constructor(config: any);
14 getModuleName(): string;
15 getCredSource(): any;
16 configure(config: any): any;
17 get(): any;
18 private _getCognitoIdentityIdStorageKey;
19 private _pickupCredentials;
20 private _keepAlive;
21 refreshFederatedToken(federatedInfo: any): Promise<ICredentials>;
22 private _providerRefreshWithRetry;
23 private _isExpired;
24 private _isPastTTL;
25 private _setCredentialsForGuest;
26 private _setCredentialsFromFederation;
27 private _setCredentialsFromSession;
28 private _loadCredentials;
29 set(params: any, source: any): Promise<ICredentials>;
30 clear(): Promise<void>;
31 private _getGuestIdentityId;
32 private _setGuestIdentityId;
33 private _removeGuestIdentityId;
34 /**
35 * Compact version of credentials
36 * @param {Object} credentials
37 * @return {Object} - Credentials
38 */
39 shear(credentials: any): {
40 accessKeyId: any;
41 sessionToken: any;
42 secretAccessKey: any;
43 identityId: any;
44 authenticated: any;
45 };
46}
47export declare const Credentials: CredentialsClass;