Beispiel #1
0
        public bool Authenticate(NetworkCredential credentials, SaslMechanics mechanic = (SaslMechanics) 0x0000)
        {
            Arguments.VerifyNotNull(credentials);

            var authenticator = new Pop3Authenticator(this);
            if (mechanic != 0x0000) {
                IsAuthenticated = authenticator.Authenticate(credentials, mechanic);
                return IsAuthenticated;
            }

            IsAuthenticated = authenticator.CanAuthenticate
                                  ? authenticator.Authenticate(credentials)
                                  : InvokeManualSaslAuthenticationRequired(credentials, this);

            return IsAuthenticated;
        }
Beispiel #2
0
        public bool Authenticate(NetworkCredential credentials, SaslMechanics mechanic = (SaslMechanics)0x0000)
        {
            Arguments.VerifyNotNull(credentials);

            var authenticator = new Pop3Authenticator(this);

            if (mechanic != 0x0000)
            {
                IsAuthenticated = authenticator.Authenticate(credentials, mechanic);
                return(IsAuthenticated);
            }

            IsAuthenticated = authenticator.CanAuthenticate
                                  ? authenticator.Authenticate(credentials)
                                  : InvokeManualSaslAuthenticationRequired(credentials, this);

            return(IsAuthenticated);
        }