Serenity.WebSecurityHelper.Authenticate C# (CSharp) Method

Authenticate() public static method

Validate user identity by checking username and password and sets authentication ticket that is based on cookie
public static Authenticate ( string &username, string password, bool persist ) : bool
username string /// Username to be validated (required).
password string /// User Password to be validated(required).
persist bool /// true to make ticket persistent? (beni hatırla seçeneği, güvenlik açısından pek kullanmıyoruz.)
return bool
        public static bool Authenticate(ref string username, string password, bool persist)
        {
            if (username == null)
                throw new ArgumentNullException("username");
            if (password == null)
                throw new ArgumentNullException("password");

            if (!Dependency.Resolve<IAuthenticationService>().Validate(ref username, password))
                return false;
            
            SetAuthenticationTicket(username, persist);
            return true;
        }