mirror of
https://github.com/bitwarden/android.git
synced 2026-05-24 07:01:26 -05:00
* First pass at vault export UI * Password validation via cryptoService * Export service framework * support for constructing json export data * Support for constructing csv export data * Cleanup and simplification * Completion of vault export feature * Formatting and simplification * Use dialog instead of toast for invalid master password entry
41 lines
1006 B
C#
41 lines
1006 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using Bit.Core.Models.View;
|
|
|
|
namespace Bit.Core.Models.Export
|
|
{
|
|
public class Login
|
|
{
|
|
public Login() { }
|
|
|
|
public Login(LoginView obj)
|
|
{
|
|
Uris = obj.Uris?.Select(u => new LoginUri(u)).ToList();
|
|
|
|
Username = obj.Username;
|
|
Password = obj.Password;
|
|
Totp = obj.Totp;
|
|
}
|
|
|
|
public List<LoginUri> Uris { get; set; }
|
|
public string Username { get; set; }
|
|
public string Password { get; set; }
|
|
public string Totp { get; set; }
|
|
|
|
public static LoginView ToView(Login req, LoginView view = null)
|
|
{
|
|
if(view == null)
|
|
{
|
|
view = new LoginView();
|
|
}
|
|
|
|
view.Uris = req.Uris?.Select(u => LoginUri.ToView(u)).ToList();
|
|
|
|
view.Username = req.Username;
|
|
view.Password = req.Password;
|
|
view.Totp = req.Totp;
|
|
return view;
|
|
}
|
|
}
|
|
}
|