mirror of
https://github.com/bitwarden/mobile.git
synced 2024-11-08 09:30:46 +01:00
sub-classed login props for cipher req
This commit is contained in:
parent
e8486abccf
commit
cc12ae7712
@ -10,23 +10,41 @@ namespace Bit.App.Models.Api
|
|||||||
OrganizationId = login.OrganizationId;
|
OrganizationId = login.OrganizationId;
|
||||||
FolderId = login.FolderId;
|
FolderId = login.FolderId;
|
||||||
Name = login.Name?.EncryptedString;
|
Name = login.Name?.EncryptedString;
|
||||||
Uri = login.Uri?.EncryptedString;
|
|
||||||
Username = login.Username?.EncryptedString;
|
|
||||||
Password = login.Password?.EncryptedString;
|
|
||||||
Notes = login.Notes?.EncryptedString;
|
Notes = login.Notes?.EncryptedString;
|
||||||
Totp = login.Totp?.EncryptedString;
|
|
||||||
Favorite = login.Favorite;
|
Favorite = login.Favorite;
|
||||||
|
|
||||||
|
switch(Type)
|
||||||
|
{
|
||||||
|
case CipherType.Login:
|
||||||
|
Login = new LoginType(login);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public CipherType Type { get; set; }
|
public CipherType Type { get; set; }
|
||||||
public string OrganizationId { get; set; }
|
public string OrganizationId { get; set; }
|
||||||
public string FolderId { get; set; }
|
public string FolderId { get; set; }
|
||||||
|
public bool Favorite { get; set; }
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
public string Notes { get; set; }
|
||||||
|
public LoginType Login { get; set; }
|
||||||
|
|
||||||
|
public class LoginType
|
||||||
|
{
|
||||||
|
public LoginType(Login login)
|
||||||
|
{
|
||||||
|
Uri = login.Uri?.EncryptedString;
|
||||||
|
Username = login.Username?.EncryptedString;
|
||||||
|
Password = login.Password?.EncryptedString;
|
||||||
|
Totp = login.Totp?.EncryptedString;
|
||||||
|
}
|
||||||
|
|
||||||
public string Uri { get; set; }
|
public string Uri { get; set; }
|
||||||
public string Username { get; set; }
|
public string Username { get; set; }
|
||||||
public string Password { get; set; }
|
public string Password { get; set; }
|
||||||
public string Notes { get; set; }
|
|
||||||
public string Totp { get; set; }
|
public string Totp { get; set; }
|
||||||
public bool Favorite { get; set; }
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user