UNPKG

1.64 kBTypeScriptView Raw
1import { ClientInfo } from "./ClientInfo";
2import { IdToken } from "./IdToken";
3import { StringDict } from "./MsalTypes";
4/**
5 * accountIdentifier combination of idToken.uid and idToken.utid
6 * homeAccountIdentifier combination of clientInfo.uid and clientInfo.utid
7 * userName idToken.preferred_username
8 * name idToken.name
9 * idToken idToken
10 * sid idToken.sid - session identifier
11 * environment idtoken.issuer (the authority that issues the token)
12 */
13export declare class Account {
14 accountIdentifier: string;
15 homeAccountIdentifier: string;
16 userName: string;
17 name: string;
18 idToken: StringDict;
19 idTokenClaims: StringDict;
20 sid: string;
21 environment: string;
22 /**
23 * Creates an Account Object
24 * @praram accountIdentifier
25 * @param homeAccountIdentifier
26 * @param userName
27 * @param name
28 * @param idToken
29 * @param sid
30 * @param environment
31 */
32 constructor(accountIdentifier: string, homeAccountIdentifier: string, userName: string, name: string, idTokenClaims: StringDict, sid: string, environment: string);
33 /**
34 * @hidden
35 * @param idToken
36 * @param clientInfo
37 */
38 static createAccount(idToken: IdToken, clientInfo: ClientInfo): Account;
39 /**
40 * Utils function to compare two Account objects - used to check if the same user account is logged in
41 *
42 * @param a1: Account object
43 * @param a2: Account object
44 */
45 static compareAccounts(a1: Account, a2: Account): boolean;
46}