mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
[PM-2270] Renamed Fido2Key.userName to Fido2Key.userDisplayName (#6005)
* Renamed fido2key property username to userDisplayName * Renamed username property on fido2key object to userdisplayname * updated username to userDisplayName in fido2 export
This commit is contained in:
@@ -120,9 +120,9 @@
|
|||||||
appStopClick
|
appStopClick
|
||||||
appStopProp
|
appStopProp
|
||||||
appA11yTitle="{{ 'copyUsername' | i18n }}"
|
appA11yTitle="{{ 'copyUsername' | i18n }}"
|
||||||
(click)="copy(cipher, cipher.fido2Key.userName, 'username', 'Username')"
|
(click)="copy(cipher, cipher.fido2Key.userDisplayName, 'username', 'Username')"
|
||||||
[ngClass]="{ disabled: !cipher.fido2Key.userName }"
|
[ngClass]="{ disabled: !cipher.fido2Key.userDisplayName }"
|
||||||
[attr.disabled]="!cipher.fido2Key.userName ? '' : null"
|
[attr.disabled]="!cipher.fido2Key.userDisplayName ? '' : null"
|
||||||
>
|
>
|
||||||
<i class="bwi bwi-lg bwi-user" aria-hidden="true"></i>
|
<i class="bwi bwi-lg bwi-user" aria-hidden="true"></i>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ export class Fido2Component implements OnInit, OnDestroy {
|
|||||||
cipher.name = message.credentialName;
|
cipher.name = message.credentialName;
|
||||||
cipher.type = CipherType.Fido2Key;
|
cipher.type = CipherType.Fido2Key;
|
||||||
cipher.fido2Key = new Fido2KeyView();
|
cipher.fido2Key = new Fido2KeyView();
|
||||||
cipher.fido2Key.userName = message.userName;
|
cipher.fido2Key.userDisplayName = message.userName;
|
||||||
this.ciphers = [cipher];
|
this.ciphers = [cipher];
|
||||||
} else if (message.type === "PickCredentialRequest") {
|
} else if (message.type === "PickCredentialRequest") {
|
||||||
this.ciphers = await Promise.all(
|
this.ciphers = await Promise.all(
|
||||||
|
|||||||
@@ -478,12 +478,12 @@
|
|||||||
<!-- Fido2Key -->
|
<!-- Fido2Key -->
|
||||||
<div *ngIf="cipher.type === cipherType.Fido2Key">
|
<div *ngIf="cipher.type === cipherType.Fido2Key">
|
||||||
<div class="box-content-row" appBoxRow>
|
<div class="box-content-row" appBoxRow>
|
||||||
<label for="fido2KeyUsername">{{ "username" | i18n }}</label>
|
<label for="fido2KeyUserDisplayName">{{ "username" | i18n }}</label>
|
||||||
<input
|
<input
|
||||||
id="fido2KeyUsername"
|
id="fido2KeyUserDisplayName"
|
||||||
type="text"
|
type="text"
|
||||||
name="Fido2Key.Username"
|
name="Fido2Key.UserDisplayName"
|
||||||
[(ngModel)]="cipher.fido2Key.userName"
|
[(ngModel)]="cipher.fido2Key.userDisplayName"
|
||||||
appInputVerbatim
|
appInputVerbatim
|
||||||
[readonly]="!cipher.edit && editMode"
|
[readonly]="!cipher.edit && editMode"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -428,7 +428,7 @@
|
|||||||
<div *ngIf="cipher.type == cipherType.Fido2Key">
|
<div *ngIf="cipher.type == cipherType.Fido2Key">
|
||||||
<div class="box-content-row">
|
<div class="box-content-row">
|
||||||
<span class="row-label">{{ "username" | i18n }}</span>
|
<span class="row-label">{{ "username" | i18n }}</span>
|
||||||
{{ cipher.fido2Key.userName }}
|
{{ cipher.fido2Key.userDisplayName }}
|
||||||
</div>
|
</div>
|
||||||
<div class="box-content-row">
|
<div class="box-content-row">
|
||||||
<span class="row-label">{{ "typePasskey" | i18n }}</span>
|
<span class="row-label">{{ "typePasskey" | i18n }}</span>
|
||||||
|
|||||||
@@ -461,12 +461,12 @@
|
|||||||
<!-- Fido2Key -->
|
<!-- Fido2Key -->
|
||||||
<div *ngIf="cipher.type === cipherType.Fido2Key">
|
<div *ngIf="cipher.type === cipherType.Fido2Key">
|
||||||
<div class="box-content-row" appBoxRow>
|
<div class="box-content-row" appBoxRow>
|
||||||
<label for="fido2KeyUsername">{{ "username" | i18n }}</label>
|
<label for="fido2KeyUserDisplayName">{{ "username" | i18n }}</label>
|
||||||
<input
|
<input
|
||||||
id="fido2KeyUsername"
|
id="fido2KeyUserDisplayName"
|
||||||
type="text"
|
type="text"
|
||||||
name="Fido2Key.Username"
|
name="Fido2Key.UserDisplayName"
|
||||||
[(ngModel)]="cipher.fido2Key.userName"
|
[(ngModel)]="cipher.fido2Key.userDisplayName"
|
||||||
appInputVerbatim
|
appInputVerbatim
|
||||||
[readonly]="!cipher.edit && editMode"
|
[readonly]="!cipher.edit && editMode"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -399,7 +399,7 @@
|
|||||||
<div class="box-content-row">
|
<div class="box-content-row">
|
||||||
<div class="row-main">
|
<div class="row-main">
|
||||||
<span class="row-label">{{ "username" | i18n }}</span>
|
<span class="row-label">{{ "username" | i18n }}</span>
|
||||||
{{ cipher.fido2Key.userName }}
|
{{ cipher.fido2Key.userDisplayName }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="box-content-row">
|
<div class="box-content-row">
|
||||||
|
|||||||
@@ -836,14 +836,14 @@
|
|||||||
<ng-container *ngIf="cipher.type === cipherType.Fido2Key">
|
<ng-container *ngIf="cipher.type === cipherType.Fido2Key">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-6 form-group">
|
<div class="col-6 form-group">
|
||||||
<label for="fido2keyUsername">{{ "username" | i18n }}</label>
|
<label for="fido2KeyUserDisplayName">{{ "username" | i18n }}</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input
|
<input
|
||||||
id="fido2keyUsername"
|
id="fido2KeyUserDisplayName"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
type="text"
|
type="text"
|
||||||
name="Fido2key.Username"
|
name="Fido2key.UserDisplayName"
|
||||||
[(ngModel)]="cipher.fido2Key.userName"
|
[(ngModel)]="cipher.fido2Key.userDisplayName"
|
||||||
appInputVerbatim
|
appInputVerbatim
|
||||||
[disabled]="cipher.isDeleted || viewOnly"
|
[disabled]="cipher.isDeleted || viewOnly"
|
||||||
[readonly]="!cipher.edit && editMode"
|
[readonly]="!cipher.edit && editMode"
|
||||||
@@ -853,7 +853,7 @@
|
|||||||
type="button"
|
type="button"
|
||||||
class="btn btn-outline-secondary"
|
class="btn btn-outline-secondary"
|
||||||
appA11yTitle="{{ 'copyUsername' | i18n }}"
|
appA11yTitle="{{ 'copyUsername' | i18n }}"
|
||||||
(click)="copy(cipher.fido2Key.userName, 'username', 'Username')"
|
(click)="copy(cipher.fido2Key.userDisplayName, 'username', 'Username')"
|
||||||
>
|
>
|
||||||
<i class="bwi bwi-lg bwi-clone" aria-hidden="true"></i>
|
<i class="bwi bwi-lg bwi-clone" aria-hidden="true"></i>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export class Fido2KeyExport {
|
|||||||
req.userHandle = "userHandle";
|
req.userHandle = "userHandle";
|
||||||
req.counter = "counter";
|
req.counter = "counter";
|
||||||
req.rpName = "rpName";
|
req.rpName = "rpName";
|
||||||
req.userName = "userName";
|
req.userDisplayName = "userDisplayName";
|
||||||
return req;
|
return req;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ export class Fido2KeyExport {
|
|||||||
view.userHandle = req.userHandle;
|
view.userHandle = req.userHandle;
|
||||||
view.counter = parseInt(req.counter);
|
view.counter = parseInt(req.counter);
|
||||||
view.rpName = req.rpName;
|
view.rpName = req.rpName;
|
||||||
view.userName = req.userName;
|
view.userDisplayName = req.userDisplayName;
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,7 +44,8 @@ export class Fido2KeyExport {
|
|||||||
domain.userHandle = req.userHandle != null ? new EncString(req.userHandle) : null;
|
domain.userHandle = req.userHandle != null ? new EncString(req.userHandle) : null;
|
||||||
domain.counter = req.counter != null ? new EncString(req.counter) : null;
|
domain.counter = req.counter != null ? new EncString(req.counter) : null;
|
||||||
domain.rpName = req.rpName != null ? new EncString(req.rpName) : null;
|
domain.rpName = req.rpName != null ? new EncString(req.rpName) : null;
|
||||||
domain.userName = req.userName != null ? new EncString(req.userName) : null;
|
domain.userDisplayName =
|
||||||
|
req.userDisplayName != null ? new EncString(req.userDisplayName) : null;
|
||||||
return domain;
|
return domain;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,7 +58,7 @@ export class Fido2KeyExport {
|
|||||||
userHandle: string;
|
userHandle: string;
|
||||||
counter: string;
|
counter: string;
|
||||||
rpName: string;
|
rpName: string;
|
||||||
userName: string;
|
userDisplayName: string;
|
||||||
|
|
||||||
constructor(o?: Fido2KeyView | Fido2KeyDomain) {
|
constructor(o?: Fido2KeyView | Fido2KeyDomain) {
|
||||||
if (o == null) {
|
if (o == null) {
|
||||||
@@ -74,7 +75,7 @@ export class Fido2KeyExport {
|
|||||||
this.userHandle = o.userHandle;
|
this.userHandle = o.userHandle;
|
||||||
this.counter = String(o.counter);
|
this.counter = String(o.counter);
|
||||||
this.rpName = o.rpName;
|
this.rpName = o.rpName;
|
||||||
this.userName = o.userName;
|
this.userDisplayName = o.userDisplayName;
|
||||||
} else {
|
} else {
|
||||||
this.nonDiscoverableId = o.nonDiscoverableId?.encryptedString;
|
this.nonDiscoverableId = o.nonDiscoverableId?.encryptedString;
|
||||||
this.keyType = o.keyType?.encryptedString;
|
this.keyType = o.keyType?.encryptedString;
|
||||||
@@ -85,7 +86,7 @@ export class Fido2KeyExport {
|
|||||||
this.userHandle = o.userHandle?.encryptedString;
|
this.userHandle = o.userHandle?.encryptedString;
|
||||||
this.counter = o.counter?.encryptedString;
|
this.counter = o.counter?.encryptedString;
|
||||||
this.rpName = o.rpName?.encryptedString;
|
this.rpName = o.rpName?.encryptedString;
|
||||||
this.userName = o.userName?.encryptedString;
|
this.userDisplayName = o.userDisplayName?.encryptedString;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export class Fido2KeyApi extends BaseResponse {
|
|||||||
|
|
||||||
// Extras
|
// Extras
|
||||||
rpName: string;
|
rpName: string;
|
||||||
userName: string;
|
userDisplayName: string;
|
||||||
|
|
||||||
constructor(data: any = null) {
|
constructor(data: any = null) {
|
||||||
super(data);
|
super(data);
|
||||||
@@ -29,6 +29,6 @@ export class Fido2KeyApi extends BaseResponse {
|
|||||||
this.userHandle = this.getResponseProperty("UserHandle");
|
this.userHandle = this.getResponseProperty("UserHandle");
|
||||||
this.counter = this.getResponseProperty("Counter");
|
this.counter = this.getResponseProperty("Counter");
|
||||||
this.rpName = this.getResponseProperty("RpName");
|
this.rpName = this.getResponseProperty("RpName");
|
||||||
this.userName = this.getResponseProperty("UserName");
|
this.userDisplayName = this.getResponseProperty("UserDisplayName");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export class Fido2KeyData {
|
|||||||
|
|
||||||
// Extras
|
// Extras
|
||||||
rpName: string;
|
rpName: string;
|
||||||
userName: string;
|
userDisplayName: string;
|
||||||
|
|
||||||
constructor(data?: Fido2KeyApi) {
|
constructor(data?: Fido2KeyApi) {
|
||||||
if (data == null) {
|
if (data == null) {
|
||||||
@@ -28,6 +28,6 @@ export class Fido2KeyData {
|
|||||||
this.userHandle = data.userHandle;
|
this.userHandle = data.userHandle;
|
||||||
this.counter = data.counter;
|
this.counter = data.counter;
|
||||||
this.rpName = data.rpName;
|
this.rpName = data.rpName;
|
||||||
this.userName = data.userName;
|
this.userDisplayName = data.userDisplayName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ export class Fido2Key extends Domain {
|
|||||||
|
|
||||||
// Extras
|
// Extras
|
||||||
rpName: EncString;
|
rpName: EncString;
|
||||||
userName: EncString;
|
userDisplayName: EncString;
|
||||||
origin: EncString;
|
origin: EncString;
|
||||||
|
|
||||||
constructor(obj?: Fido2KeyData) {
|
constructor(obj?: Fido2KeyData) {
|
||||||
@@ -40,7 +40,7 @@ export class Fido2Key extends Domain {
|
|||||||
userHandle: null,
|
userHandle: null,
|
||||||
counter: null,
|
counter: null,
|
||||||
rpName: null,
|
rpName: null,
|
||||||
userName: null,
|
userDisplayName: null,
|
||||||
origin: null,
|
origin: null,
|
||||||
},
|
},
|
||||||
[]
|
[]
|
||||||
@@ -59,7 +59,7 @@ export class Fido2Key extends Domain {
|
|||||||
rpId: null,
|
rpId: null,
|
||||||
userHandle: null,
|
userHandle: null,
|
||||||
rpName: null,
|
rpName: null,
|
||||||
userName: null,
|
userDisplayName: null,
|
||||||
origin: null,
|
origin: null,
|
||||||
},
|
},
|
||||||
orgId,
|
orgId,
|
||||||
@@ -92,7 +92,7 @@ export class Fido2Key extends Domain {
|
|||||||
userHandle: null,
|
userHandle: null,
|
||||||
counter: null,
|
counter: null,
|
||||||
rpName: null,
|
rpName: null,
|
||||||
userName: null,
|
userDisplayName: null,
|
||||||
origin: null,
|
origin: null,
|
||||||
});
|
});
|
||||||
return i;
|
return i;
|
||||||
@@ -112,7 +112,7 @@ export class Fido2Key extends Domain {
|
|||||||
const userHandle = EncString.fromJSON(obj.userHandle);
|
const userHandle = EncString.fromJSON(obj.userHandle);
|
||||||
const counter = EncString.fromJSON(obj.counter);
|
const counter = EncString.fromJSON(obj.counter);
|
||||||
const rpName = EncString.fromJSON(obj.rpName);
|
const rpName = EncString.fromJSON(obj.rpName);
|
||||||
const userName = EncString.fromJSON(obj.userName);
|
const userDisplayName = EncString.fromJSON(obj.userDisplayName);
|
||||||
const origin = EncString.fromJSON(obj.origin);
|
const origin = EncString.fromJSON(obj.origin);
|
||||||
|
|
||||||
return Object.assign(new Fido2Key(), obj, {
|
return Object.assign(new Fido2Key(), obj, {
|
||||||
@@ -125,7 +125,7 @@ export class Fido2Key extends Domain {
|
|||||||
userHandle,
|
userHandle,
|
||||||
counter,
|
counter,
|
||||||
rpName,
|
rpName,
|
||||||
userName,
|
userDisplayName,
|
||||||
origin,
|
origin,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ describe("Login DTO", () => {
|
|||||||
userHandle: "userHandle" as EncryptedString,
|
userHandle: "userHandle" as EncryptedString,
|
||||||
counter: "counter" as EncryptedString,
|
counter: "counter" as EncryptedString,
|
||||||
rpName: "rpName" as EncryptedString,
|
rpName: "rpName" as EncryptedString,
|
||||||
userName: "userName" as EncryptedString,
|
userDisplayName: "userDisplayName" as EncryptedString,
|
||||||
origin: "origin" as EncryptedString,
|
origin: "origin" as EncryptedString,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -143,7 +143,7 @@ describe("Login DTO", () => {
|
|||||||
userHandle: "userHandle_fromJSON",
|
userHandle: "userHandle_fromJSON",
|
||||||
counter: "counter_fromJSON",
|
counter: "counter_fromJSON",
|
||||||
rpName: "rpName_fromJSON",
|
rpName: "rpName_fromJSON",
|
||||||
userName: "userName_fromJSON",
|
userDisplayName: "userDisplayName_fromJSON",
|
||||||
origin: "origin_fromJSON",
|
origin: "origin_fromJSON",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -100,9 +100,9 @@ export class CipherRequest {
|
|||||||
cipher.login.fido2Key.userHandle != null
|
cipher.login.fido2Key.userHandle != null
|
||||||
? cipher.login.fido2Key.userHandle.encryptedString
|
? cipher.login.fido2Key.userHandle.encryptedString
|
||||||
: null;
|
: null;
|
||||||
this.login.fido2Key.userName =
|
this.login.fido2Key.userDisplayName =
|
||||||
cipher.login.fido2Key.userName != null
|
cipher.login.fido2Key.userDisplayName != null
|
||||||
? cipher.login.fido2Key.userName.encryptedString
|
? cipher.login.fido2Key.userDisplayName.encryptedString
|
||||||
: null;
|
: null;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -193,8 +193,10 @@ export class CipherRequest {
|
|||||||
cipher.fido2Key.counter != null ? cipher.fido2Key.counter.encryptedString : null;
|
cipher.fido2Key.counter != null ? cipher.fido2Key.counter.encryptedString : null;
|
||||||
this.fido2Key.userHandle =
|
this.fido2Key.userHandle =
|
||||||
cipher.fido2Key.userHandle != null ? cipher.fido2Key.userHandle.encryptedString : null;
|
cipher.fido2Key.userHandle != null ? cipher.fido2Key.userHandle.encryptedString : null;
|
||||||
this.fido2Key.userName =
|
this.fido2Key.userDisplayName =
|
||||||
cipher.fido2Key.userName != null ? cipher.fido2Key.userName.encryptedString : null;
|
cipher.fido2Key.userDisplayName != null
|
||||||
|
? cipher.fido2Key.userDisplayName.encryptedString
|
||||||
|
: null;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -14,10 +14,10 @@ export class Fido2KeyView extends ItemView {
|
|||||||
|
|
||||||
// Extras
|
// Extras
|
||||||
rpName: string;
|
rpName: string;
|
||||||
userName: string;
|
userDisplayName: string;
|
||||||
|
|
||||||
get subTitle(): string {
|
get subTitle(): string {
|
||||||
return this.userName;
|
return this.userDisplayName;
|
||||||
}
|
}
|
||||||
|
|
||||||
get canLaunch(): boolean {
|
get canLaunch(): boolean {
|
||||||
|
|||||||
@@ -1103,7 +1103,7 @@ export class CipherService implements CipherServiceAbstraction {
|
|||||||
rpId: null,
|
rpId: null,
|
||||||
rpName: null,
|
rpName: null,
|
||||||
userHandle: null,
|
userHandle: null,
|
||||||
userName: null,
|
userDisplayName: null,
|
||||||
origin: null,
|
origin: null,
|
||||||
},
|
},
|
||||||
key
|
key
|
||||||
@@ -1175,7 +1175,7 @@ export class CipherService implements CipherServiceAbstraction {
|
|||||||
rpId: null,
|
rpId: null,
|
||||||
rpName: null,
|
rpName: null,
|
||||||
userHandle: null,
|
userHandle: null,
|
||||||
userName: null,
|
userDisplayName: null,
|
||||||
origin: null,
|
origin: null,
|
||||||
},
|
},
|
||||||
key
|
key
|
||||||
|
|||||||
@@ -320,7 +320,7 @@ describe("FidoAuthenticatorService", () => {
|
|||||||
rpName: params.rpEntity.name,
|
rpName: params.rpEntity.name,
|
||||||
userHandle: Fido2Utils.bufferToString(params.userEntity.id),
|
userHandle: Fido2Utils.bufferToString(params.userEntity.id),
|
||||||
counter: 0,
|
counter: 0,
|
||||||
userName: params.userEntity.displayName,
|
userDisplayName: params.userEntity.displayName,
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
@@ -419,7 +419,7 @@ describe("FidoAuthenticatorService", () => {
|
|||||||
rpName: params.rpEntity.name,
|
rpName: params.rpEntity.name,
|
||||||
userHandle: Fido2Utils.bufferToString(params.userEntity.id),
|
userHandle: Fido2Utils.bufferToString(params.userEntity.id),
|
||||||
counter: 0,
|
counter: 0,
|
||||||
userName: params.userEntity.displayName,
|
userDisplayName: params.userEntity.displayName,
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -427,7 +427,7 @@ async function createKeyView(
|
|||||||
fido2Key.userHandle = Fido2Utils.bufferToString(params.userEntity.id);
|
fido2Key.userHandle = Fido2Utils.bufferToString(params.userEntity.id);
|
||||||
fido2Key.counter = 0;
|
fido2Key.counter = 0;
|
||||||
fido2Key.rpName = params.rpEntity.name;
|
fido2Key.rpName = params.rpEntity.name;
|
||||||
fido2Key.userName = params.userEntity.displayName;
|
fido2Key.userDisplayName = params.userEntity.displayName;
|
||||||
|
|
||||||
return fido2Key;
|
return fido2Key;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user