mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-19 17:01:13 +00:00
Migrated Hosted Explorer to React (#360)
Co-authored-by: Victor Meng <vimeng@microsoft.com> Co-authored-by: Steve Faulkner <stfaul@microsoft.com>
This commit is contained in:
32
src/HostedExplorerChildFrame.ts
Normal file
32
src/HostedExplorerChildFrame.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import { AuthType } from "./AuthType";
|
||||
import { AccessInputMetadata, DatabaseAccount } from "./Contracts/DataModels";
|
||||
|
||||
export interface HostedExplorerChildFrame extends Window {
|
||||
hostedConfig: AAD | ConnectionString | EncryptedToken | ResourceToken;
|
||||
}
|
||||
|
||||
interface AAD {
|
||||
authType: AuthType.AAD;
|
||||
databaseAccount: DatabaseAccount;
|
||||
authorizationToken: string;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
interface EncryptedToken {
|
||||
authType: AuthType.EncryptedToken;
|
||||
encryptedToken: string;
|
||||
encryptedTokenMetadata: AccessInputMetadata;
|
||||
}
|
||||
|
||||
interface ResourceToken {
|
||||
authType: AuthType.ResourceToken;
|
||||
resourceToken: string;
|
||||
}
|
||||
Reference in New Issue
Block a user