mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2024-11-29 00:47:01 +00:00
e41b52e265
* Redo user endpoint dynamic token * Fixes aad endpoint race condition, tenant switching, and account permissions * Export const msalInstance * Format * fix import * format * Redo getMsalInstance * format again * Check for doc endpoint
34 lines
1.0 KiB
TypeScript
34 lines
1.0 KiB
TypeScript
import { AuthType } from "./AuthType";
|
|
import { AccessInputMetadata, DatabaseAccount } from "./Contracts/DataModels";
|
|
|
|
type HostedConfig = AAD | ConnectionString | EncryptedToken | ResourceToken;
|
|
export interface HostedExplorerChildFrame extends Window {
|
|
hostedConfig: HostedConfig;
|
|
}
|
|
|
|
export interface AAD {
|
|
authType: AuthType.AAD;
|
|
databaseAccount: DatabaseAccount;
|
|
authorizationToken: string;
|
|
}
|
|
|
|
export interface ConnectionString {
|
|
authType: AuthType.ConnectionString;
|
|
// Connection string uses still use encrypted token for Cassandra/Mongo APIs as they us the portal backend proxy
|
|
encryptedToken: string;
|
|
encryptedTokenMetadata: AccessInputMetadata;
|
|
// Master key is currently only used by Graph API. All other APIs use encrypted tokens and proxy with connection string
|
|
masterKey?: string;
|
|
}
|
|
|
|
export interface EncryptedToken {
|
|
authType: AuthType.EncryptedToken;
|
|
encryptedToken: string;
|
|
encryptedTokenMetadata: AccessInputMetadata;
|
|
}
|
|
|
|
export interface ResourceToken {
|
|
authType: AuthType.ResourceToken;
|
|
resourceToken: string;
|
|
}
|