Exemple #1
0
        public CipherLoginModel(CipherLoginData data)
        {
            Uris = data.Uris?.Select(u => new CipherLoginUriModel(u))?.ToList();
            if (!Uris?.Any() ?? true)
            {
                Uri = data.Uri;
            }

            Username = data.Username;
            Password = data.Password;
            Totp     = data.Totp;
        }
Exemple #2
0
        public CipherLoginModel(CipherLoginData data)
        {
            Uris = data.Uris?.Select(u => new CipherLoginUriModel(u))?.ToList();
            if (!Uris?.Any() ?? true)
            {
                Uri = data.Uri;
            }

            Username             = data.Username;
            Password             = data.Password;
            PasswordRevisionDate = data.PasswordRevisionDate;
            Totp = data.Totp;
            AutofillOnPageLoad = data.AutofillOnPageLoad;
        }
Exemple #3
0
        public LoginData ToLoginData()
        {
            var l = new LoginData();

            l.PasswordRevisionDate = PasswordRevisionDate;
            BuildDataModel(this, l, new HashSet <string>
            {
                "Username",
                "Password",
                "Totp"
            });
            if (Uris?.Any() ?? false)
            {
                l.Uris = Uris.Select(u => u.ToLoginUriData()).ToList();
            }
            return(l);
        }
Exemple #4
0
        protected override void PrepareParam()
        {
            if (Uris == null || !Uris.Any())
            {
                throw new Exception();
            }

            AddParam(Uris);

            if (Options != null)
            {
                AddParam(Options);
                if (Position.HasValue)
                {
                    AddParam(Position);
                }
            }
        }