Opc.Ua.Configuration.UserNameCreator.Add C# (CSharp) Method

Add() public method

Add a User.
public Add ( string applicationName, string userName, string password ) : void
applicationName string The Application Name.
userName string The UserName.
password string The Password.
return void
        public void Add(string applicationName, string userName, string password)
        {
            lock (m_lock)
            {
                UserNameIdentityToken newUserNameToken = new UserNameIdentityToken()
                {
                    UserName = userName,
                    DecryptedPassword = password,
                };

                newUserNameToken.Password = new UTF8Encoding().GetBytes(newUserNameToken.DecryptedPassword);

                m_UserNameIdentityTokens.Add(newUserNameToken.UserName, newUserNameToken);

                SaveUserName(applicationName, newUserNameToken);
            }
        }