mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
feat(web): [PM-15063] add banner for pending device auth requests
Adds a banner in the web vault to notify users when they have pending device authentication requests. The banner links to the device management screen. Also implements real-time updates to the device management table when new auth requests are received. JIRA: PM-15063
This commit is contained in:
@@ -1,20 +1,19 @@
|
||||
// FIXME: Update this file to be type safe and remove this and next line
|
||||
// @ts-strict-ignore
|
||||
import { DeviceType } from "../../../../enums";
|
||||
import { View } from "../../../../models/view/view";
|
||||
import { DeviceResponse } from "../responses/device.response";
|
||||
|
||||
export class DeviceView implements View {
|
||||
id: string;
|
||||
userId: string;
|
||||
name: string;
|
||||
identifier: string;
|
||||
type: DeviceType;
|
||||
creationDate: string;
|
||||
revisionDate: string;
|
||||
response: DeviceResponse;
|
||||
id: string | undefined;
|
||||
userId: string | undefined;
|
||||
name: string | undefined;
|
||||
identifier: string | undefined;
|
||||
type: DeviceType | undefined;
|
||||
creationDate: string | undefined;
|
||||
revisionDate: string | undefined;
|
||||
response: DeviceResponse | undefined;
|
||||
|
||||
constructor(deviceResponse: DeviceResponse) {
|
||||
Object.assign(this, deviceResponse);
|
||||
this.response = deviceResponse;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ const RequestTimeOut = 60000 * 15; //15 Minutes
|
||||
export class AuthRequestResponse extends BaseResponse {
|
||||
id: string;
|
||||
publicKey: string;
|
||||
requestDeviceType: DeviceType;
|
||||
requestDeviceType: string;
|
||||
requestDeviceTypeValue: DeviceType;
|
||||
requestDeviceIdentifier: string;
|
||||
requestIpAddress: string;
|
||||
key: string; // could be either an encrypted MasterKey or an encrypted UserKey
|
||||
masterPasswordHash: string; // if hash is present, the `key` above is an encrypted MasterKey (else `key` is an encrypted UserKey)
|
||||
@@ -21,6 +23,8 @@ export class AuthRequestResponse extends BaseResponse {
|
||||
this.id = this.getResponseProperty("Id");
|
||||
this.publicKey = this.getResponseProperty("PublicKey");
|
||||
this.requestDeviceType = this.getResponseProperty("RequestDeviceType");
|
||||
this.requestDeviceTypeValue = this.getResponseProperty("RequestDeviceTypeValue");
|
||||
this.requestDeviceIdentifier = this.getResponseProperty("RequestDeviceIdentifier");
|
||||
this.requestIpAddress = this.getResponseProperty("RequestIpAddress");
|
||||
this.key = this.getResponseProperty("Key");
|
||||
this.masterPasswordHash = this.getResponseProperty("MasterPasswordHash");
|
||||
|
||||
Reference in New Issue
Block a user