modules inc

This commit is contained in:
nannal
2021-07-15 23:10:20 +03:00
parent 6bb353de89
commit 5921b02b7c
845 changed files with 105299 additions and 121 deletions

View File

@@ -0,0 +1,21 @@
/**
* Account object with the following signature:
* - homeAccountId - Home account identifier for this account object
* - environment - Entity which issued the token represented by the domain of the issuer (e.g. login.microsoftonline.com)
* - tenantId - Full tenant or organizational id that this account belongs to
* - username - preferred_username claim of the id_token that represents this account
* - localAccountId - Local, tenant-specific account identifer for this account object, usually used in legacy cases
* - name - Full name for the account, including given name and family name
* - idTokenClaims - Object contains claims from ID token
* - localAccountId - The user's account ID
*/
export declare type AccountInfo = {
homeAccountId: string;
environment: string;
tenantId: string;
username: string;
localAccountId: string;
name?: string;
idTokenClaims?: object;
};
//# sourceMappingURL=AccountInfo.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"AccountInfo.d.ts","sourceRoot":"","sources":["../../src/account/AccountInfo.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;GAUG;AACH,oBAAY,WAAW,GAAG;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC"}

View File

@@ -0,0 +1,17 @@
import { TokenClaims } from "./TokenClaims";
import { ICrypto } from "../crypto/ICrypto";
/**
* JWT Token representation class. Parses token string and generates claims object.
*/
export declare class AuthToken {
rawToken: string;
claims: TokenClaims;
constructor(rawToken: string, crypto: ICrypto);
/**
* Extract token by decoding the rawToken
*
* @param encodedToken
*/
static extractTokenClaims(encodedToken: string, crypto: ICrypto): TokenClaims;
}
//# sourceMappingURL=AuthToken.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"AuthToken.d.ts","sourceRoot":"","sources":["../../src/account/AuthToken.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C;;GAEG;AACH,qBAAa,SAAS;IAGlB,QAAQ,EAAE,MAAM,CAAC;IAEjB,MAAM,EAAE,WAAW,CAAC;gBACR,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO;IAS7C;;;;OAIG;IACH,MAAM,CAAC,kBAAkB,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,WAAW;CAehF"}

View File

@@ -0,0 +1,15 @@
import { ICrypto } from "../crypto/ICrypto";
/**
* Client info object which consists of two IDs. Need to add more info here.
*/
export declare type ClientInfo = {
uid: string;
utid: string;
};
/**
* Function to build a client info object
* @param rawClientInfo
* @param crypto
*/
export declare function buildClientInfo(rawClientInfo: string, crypto: ICrypto): ClientInfo;
//# sourceMappingURL=ClientInfo.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ClientInfo.d.ts","sourceRoot":"","sources":["../../src/account/ClientInfo.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C;;GAEG;AACH,oBAAY,UAAU,GAAG;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAA;CACf,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,UAAU,CAWlF"}

View File

@@ -0,0 +1,9 @@
/**
* Interface for Decoded JWT tokens.
*/
export interface DecodedAuthToken {
header: string;
JWSPayload: string;
JWSSig: string;
}
//# sourceMappingURL=DecodedAuthToken.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"DecodedAuthToken.d.ts","sourceRoot":"","sources":["../../src/account/DecodedAuthToken.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAA;CACjB"}

View File

@@ -0,0 +1,23 @@
/**
* Type which describes Id Token claims known by MSAL.
*/
export declare type TokenClaims = {
iss?: string;
oid?: string;
sub?: string;
tid?: string;
ver?: string;
upn?: string;
preferred_username?: string;
emails?: string[];
name?: string;
nonce?: string;
exp?: number;
home_oid?: string;
sid?: string;
cloud_instance_host_name?: string;
cnf?: {
kid: string;
};
};
//# sourceMappingURL=TokenClaims.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"TokenClaims.d.ts","sourceRoot":"","sources":["../../src/account/TokenClaims.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,oBAAY,WAAW,GAAG;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,GAAG,CAAC,EAAE;QACF,GAAG,EAAE,MAAM,CAAC;KACf,CAAC;CACL,CAAC"}