mirror of
https://github.com/bitwarden/browser
synced 2025-12-23 11:43:46 +00:00
[PM-19532] - Add Fingerprint phrase to cli auth request (#14556)
* first pass at adding fingerprint phrase to auth requests * Moved call to getFingerprint into the service layer. Added a new method for getting auth requests. Updated tests. * Fixing the import * Renaming to WithFingerprint
This commit is contained in:
@@ -47,7 +47,10 @@ export class ListCommand {
|
||||
|
||||
try {
|
||||
const requests =
|
||||
await this.organizationAuthRequestService.listPendingRequests(organizationId);
|
||||
await this.organizationAuthRequestService.listPendingRequestsWithFingerprint(
|
||||
organizationId,
|
||||
);
|
||||
|
||||
const res = new ListResponse(requests.map((r) => new PendingAuthRequestResponse(r)));
|
||||
return Response.success(res);
|
||||
} catch (e) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { PendingAuthRequestView } from "@bitwarden/bit-common/admin-console/auth-requests/";
|
||||
import { PendingAuthRequestWithFingerprintView } from "@bitwarden/bit-common/admin-console/auth-requests/pending-auth-request-with-fingerprint.view";
|
||||
import { BaseResponse } from "@bitwarden/cli/models/response/base.response";
|
||||
|
||||
export class PendingAuthRequestResponse implements BaseResponse {
|
||||
@@ -12,8 +12,9 @@ export class PendingAuthRequestResponse implements BaseResponse {
|
||||
requestDeviceType: string;
|
||||
requestIpAddress: string;
|
||||
creationDate: Date;
|
||||
fingerprintPhrase: string;
|
||||
|
||||
constructor(authRequest: PendingAuthRequestView) {
|
||||
constructor(authRequest: PendingAuthRequestWithFingerprintView) {
|
||||
this.id = authRequest.id;
|
||||
this.userId = authRequest.userId;
|
||||
this.organizationUserId = authRequest.organizationUserId;
|
||||
@@ -22,5 +23,6 @@ export class PendingAuthRequestResponse implements BaseResponse {
|
||||
this.requestDeviceType = authRequest.requestDeviceType;
|
||||
this.requestIpAddress = authRequest.requestIpAddress;
|
||||
this.creationDate = authRequest.creationDate;
|
||||
this.fingerprintPhrase = authRequest.fingerprintPhrase;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user