1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 08:43:33 +00:00

Added device registration information during authentication

This commit is contained in:
Kyle Spearrin
2017-01-25 20:42:09 -05:00
parent 5a20f9de01
commit 4be033df71
3 changed files with 45 additions and 25 deletions

View File

@@ -16,10 +16,10 @@ var TokenRequest = function (email, masterPasswordHash, token, device) {
this.email = email;
this.masterPasswordHash = masterPasswordHash;
this.token = token;
this.provider = 'Authenticator';
this.provider = 0; // authenticator
this.device = null;
if (device) {
this.device = new DeviceRequest(device);
this.device = device;
}
this.toIdentityToken = function () {
@@ -62,9 +62,9 @@ var DeviceTokenRequest = function () {
this.pushToken = null;
};
var DeviceRequest = function () {
this.type = null;
this.name = null;
this.identifier = null;
var DeviceRequest = function (appId, utilsService) {
this.type = utilsService.getDeviceType();
this.name = utilsService.getBrowser();
this.identifier = appId;
this.pushToken = null;
};