mirror of
https://github.com/bitwarden/browser
synced 2025-12-25 20:53:22 +00:00
Add support for crypto agent (#520)
This commit is contained in:
@@ -37,6 +37,9 @@ enum Saml2SigningBehavior {
|
||||
export class SsoConfigApi extends BaseResponse {
|
||||
configType: SsoType;
|
||||
|
||||
useCryptoAgent: boolean;
|
||||
cryptoAgentUrl: string;
|
||||
|
||||
// OpenId
|
||||
authority: string;
|
||||
clientId: string;
|
||||
@@ -78,6 +81,9 @@ export class SsoConfigApi extends BaseResponse {
|
||||
|
||||
this.configType = this.getResponseProperty('ConfigType');
|
||||
|
||||
this.useCryptoAgent = this.getResponseProperty('UseCryptoAgent');
|
||||
this.cryptoAgentUrl = this.getResponseProperty('CryptoAgentUrl');
|
||||
|
||||
this.authority = this.getResponseProperty('Authority');
|
||||
this.clientId = this.getResponseProperty('ClientId');
|
||||
this.clientSecret = this.getResponseProperty('ClientSecret');
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
import { KeysRequest } from '../keysRequest';
|
||||
|
||||
import { KdfType } from '../../../enums/kdfType';
|
||||
|
||||
export class SetCryptoAgentKeyRequest {
|
||||
key: string;
|
||||
keys: KeysRequest;
|
||||
kdf: KdfType;
|
||||
kdfIterations: number;
|
||||
orgIdentifier: string;
|
||||
|
||||
constructor(key: string, kdf: KdfType, kdfIterations: number, orgIdentifier: string, keys: KeysRequest) {
|
||||
this.key = key;
|
||||
this.kdf = kdf;
|
||||
this.kdfIterations = kdfIterations;
|
||||
this.orgIdentifier = orgIdentifier;
|
||||
this.keys = keys;
|
||||
}
|
||||
}
|
||||
7
common/src/models/request/cryptoAgentUserKeyRequest.ts
Normal file
7
common/src/models/request/cryptoAgentUserKeyRequest.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export class CryptoAgentUserKeyRequest {
|
||||
key: string;
|
||||
|
||||
constructor(key: string) {
|
||||
this.key = key;
|
||||
}
|
||||
}
|
||||
10
common/src/models/response/cryptoAgentUserKeyResponse.ts
Normal file
10
common/src/models/response/cryptoAgentUserKeyResponse.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { BaseResponse } from './baseResponse';
|
||||
|
||||
export class CryptoAgentUserKeyResponse extends BaseResponse {
|
||||
key: string;
|
||||
|
||||
constructor(response: any) {
|
||||
super(response);
|
||||
this.key = this.getResponseProperty('Key');
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@ export class IdentityTokenResponse extends BaseResponse {
|
||||
kdf: KdfType;
|
||||
kdfIterations: number;
|
||||
forcePasswordReset: boolean;
|
||||
cryptoAgentUrl: string;
|
||||
|
||||
constructor(response: any) {
|
||||
super(response);
|
||||
@@ -30,5 +31,6 @@ export class IdentityTokenResponse extends BaseResponse {
|
||||
this.kdf = this.getResponseProperty('Kdf');
|
||||
this.kdfIterations = this.getResponseProperty('KdfIterations');
|
||||
this.forcePasswordReset = this.getResponseProperty('ForcePasswordReset');
|
||||
this.cryptoAgentUrl = this.getResponseProperty('CryptoAgentUrl');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user