mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-23 11:56:00 +01:00
kdf apis
This commit is contained in:
parent
00562d083b
commit
ae54094fcd
@ -16,6 +16,7 @@ import { ImportCiphersRequest } from '../models/request/importCiphersRequest';
|
||||
import { ImportDirectoryRequest } from '../models/request/importDirectoryRequest';
|
||||
import { ImportOrganizationCiphersRequest } from '../models/request/importOrganizationCiphersRequest';
|
||||
import { KeysRequest } from '../models/request/keysRequest';
|
||||
import { KdfRequest } from '../models/request/kdfRequest';
|
||||
import { OrganizationCreateRequest } from '../models/request/organizationCreateRequest';
|
||||
import { OrganizationUpdateRequest } from '../models/request/organizationUpdateRequest';
|
||||
import { OrganizationUserAcceptRequest } from '../models/request/organizationUserAcceptRequest';
|
||||
@ -116,6 +117,7 @@ export abstract class ApiService {
|
||||
postAccountVerifyEmailToken: (request: VerifyEmailRequest) => Promise<any>;
|
||||
postAccountRecoverDelete: (request: DeleteRecoverRequest) => Promise<any>;
|
||||
postAccountRecoverDeleteToken: (request: VerifyDeleteRecoverRequest) => Promise<any>;
|
||||
postAccountKdf: (request: KdfRequest) => Promise<any>;
|
||||
|
||||
getFolder: (id: string) => Promise<FolderResponse>;
|
||||
postFolder: (request: FolderRequest) => Promise<FolderResponse>;
|
||||
|
@ -1,3 +1,3 @@
|
||||
export enum KdfType {
|
||||
PBKDF2 = 0,
|
||||
PBKDF2_SHA256 = 0,
|
||||
}
|
||||
|
8
src/models/request/kdfRequest.ts
Normal file
8
src/models/request/kdfRequest.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import { PasswordRequest } from './passwordRequest';
|
||||
|
||||
import { KdfType } from '../../enums/kdfType';
|
||||
|
||||
export class KdfRequest extends PasswordRequest {
|
||||
kdf: KdfType;
|
||||
kdfIterations: number;
|
||||
}
|
@ -21,6 +21,7 @@ import { GroupRequest } from '../models/request/groupRequest';
|
||||
import { ImportCiphersRequest } from '../models/request/importCiphersRequest';
|
||||
import { ImportDirectoryRequest } from '../models/request/importDirectoryRequest';
|
||||
import { ImportOrganizationCiphersRequest } from '../models/request/importOrganizationCiphersRequest';
|
||||
import { KdfRequest } from '../models/request/kdfRequest';
|
||||
import { KeysRequest } from '../models/request/keysRequest';
|
||||
import { OrganizationCreateRequest } from '../models/request/organizationCreateRequest';
|
||||
import { OrganizationUpdateRequest } from '../models/request/organizationUpdateRequest';
|
||||
@ -284,6 +285,10 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
return this.send('POST', '/accounts/delete-recover-token', request, false, false);
|
||||
}
|
||||
|
||||
postAccountKdf(request: KdfRequest): Promise<any> {
|
||||
return this.send('POST', '/accounts/kdf', request, true, false);
|
||||
}
|
||||
|
||||
// Folder APIs
|
||||
|
||||
async getFolder(id: string): Promise<FolderResponse> {
|
||||
|
Loading…
Reference in New Issue
Block a user