Example #1
0
        public AuthorizationResult Authorize(CredentialInfo credentiolInfo)
        {
            UserProviderSoapClient userProvider     = new UserProviderSoapClient();
            string              userLogin           = credentiolInfo.UserLogin;
            UserDTO             userDTO             = userProvider.Find(userLogin);
            AuthorizationResult authorizationResult = new AuthorizationResult((userDTO != null), userDTO);

            return(authorizationResult);
        }
Example #2
0
 private void Authorize()
 {
     CredentialInfo credentialInfo = new CredentialInfo(textBoxUseName.Text);
     AuthorizationResult = authorizer.Authorize(credentialInfo);
     if (AuthorizationResult.Authorized)
     {
         this.DialogResult = DialogResult.OK;
     }
     else
     {
         labelMessageForUser.Text = "User name is incorrect. Try again.";
         textBoxUseName.Focus();
     }
 }
Example #3
0
        private void Authorize()
        {
            CredentialInfo credentialInfo = new CredentialInfo(textBoxUseName.Text);

            AuthorizationResult = authorizer.Authorize(credentialInfo);
            if (AuthorizationResult.Authorized)
            {
                this.DialogResult = DialogResult.OK;
            }
            else
            {
                labelMessageForUser.Text = "User name is incorrect. Try again.";
                textBoxUseName.Focus();
            }
        }
 public AuthorizationResult Authorize(CredentialInfo credentiolInfo)
 {
     return new AuthorizationResult(true, null);
 }