mirror of
https://github.com/bitwarden/directory-connector
synced 2025-12-05 23:53:21 +00:00
[PM-32177] - Fixing Backward Compatibility with Azure AD (#813)
* Updating the fetching of the config and key to check entra and check azure afterwards. * Making this camelCase to match other values.
This commit is contained in:
@@ -24,7 +24,7 @@ const SecureStorageKeys = {
|
||||
// Azure Active Directory was renamed to Entra ID, but we've kept the old property name
|
||||
// to be backwards compatible with existing configurations.
|
||||
azure: "azureKey",
|
||||
entra: "entrakey",
|
||||
entra: "entraKey",
|
||||
okta: "oktaToken",
|
||||
oneLogin: "oneLoginClientSecret",
|
||||
userDelta: "userDeltaToken",
|
||||
@@ -204,7 +204,9 @@ export class StateService
|
||||
return entraKey;
|
||||
}
|
||||
|
||||
await this.secureStorageService.get<string>(`${options.userId}_${SecureStorageKeys.azure}`);
|
||||
return await this.secureStorageService.get<string>(
|
||||
`${options.userId}_${SecureStorageKeys.azure}`,
|
||||
);
|
||||
}
|
||||
|
||||
private async setEntraKey(value: string, options?: StorageOptions): Promise<void> {
|
||||
@@ -316,9 +318,17 @@ export class StateService
|
||||
}
|
||||
|
||||
async getEntraConfiguration(options?: StorageOptions): Promise<EntraIdConfiguration> {
|
||||
return (
|
||||
const entraConfig = (
|
||||
await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskOptions()))
|
||||
)?.directoryConfigurations?.entra;
|
||||
|
||||
if (entraConfig != null) {
|
||||
return entraConfig;
|
||||
}
|
||||
|
||||
return (
|
||||
await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskOptions()))
|
||||
)?.directoryConfigurations?.azure;
|
||||
}
|
||||
|
||||
async setEntraConfiguration(
|
||||
|
||||
Reference in New Issue
Block a user