Esempio n. 1
0
        /// <summary>
        /// Represents the Identity of a member.
        /// </summary>
        /// <param name="name">The unique identifier of the current user.</param>
        /// <param name="password">The password of the current user.</param>
        /// <param name="domain">The domain of the current user.</param>
        /// <param name="applicationName">The application name of the current user; else (All).</param>
        /// <param name="authenticationSchemes">The type of authentication schemes used.</param>
        public IdentityMember(string name, string password, string domain = "", string applicationName = "All",
                              Nequeo.Security.AuthenticationType authenticationSchemes = Nequeo.Security.AuthenticationType.None)
        {
            _uniqueIdentifier      = name;
            _password              = password;
            _domain                = domain;
            _applicationName       = applicationName;
            _authenticationSchemes = authenticationSchemes;

            // Get the secure password.
            _passwordSecure = new Nequeo.Security.SecureText().GetSecureText(password);
        }
Esempio n. 2
0
        /// <summary>
        /// Set the password if it exists else create new entry.
        /// </summary>
        /// <param name="storeName">The name of the password loaded from the store.</param>
        /// <param name="storePassword">The password to store for the name.</param>
        public void SetPasswordSecure(string storeName, SecureString storePassword)
        {
            string password = new Nequeo.Security.SecureText().GetText(storePassword);

            SetPassword(storeName, password);
        }