mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 00:33:44 +00:00
user public key apis
This commit is contained in:
@@ -78,6 +78,7 @@ import { TwoFactorProviderResponse } from '../models/response/twoFactorProviderR
|
||||
import { TwoFactorRecoverResponse } from '../models/response/twoFactorRescoverResponse';
|
||||
import { TwoFactorU2fResponse } from '../models/response/twoFactorU2fResponse';
|
||||
import { TwoFactorYubiKeyResponse } from '../models/response/twoFactorYubiKeyResponse';
|
||||
import { UserKeyResponse } from '../models/response/userKeyResponse';
|
||||
|
||||
export class ApiService implements ApiServiceAbstraction {
|
||||
urlsSet: boolean = false;
|
||||
@@ -649,6 +650,13 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
return new ListResponse(r, EventResponse);
|
||||
}
|
||||
|
||||
// User APIs
|
||||
|
||||
async getUserPublicKey(id: string): Promise<UserKeyResponse> {
|
||||
const r = await this.send('GET', '/users/' + id + '/public-key', null, true, true);
|
||||
return new UserKeyResponse(r);
|
||||
}
|
||||
|
||||
// Helpers
|
||||
|
||||
fetch(request: Request): Promise<Response> {
|
||||
|
||||
Reference in New Issue
Block a user