Пример #1
0
        public void EmptyAuthTest()
        {
            var auth = new Authenticator(GetBackend());

            var resp = auth.Authorize(new AuthRequest("", ""));

            Assert.Equal(Backend.GetName(), resp.BackendName);
        }
Пример #2
0
        public void OauthAuthTest()
        {
            var auth = new Authenticator(GetBackend());

            var resp = auth.Authorize(new AuthRequest("oAuthUser", "oAuthPass"));

            Assert.Equal(OAuthBackend.GetName(), resp.BackendName);
        }
Пример #3
0
        public void ApiAuthTest()
        {
            var auth = new Authenticator(GetBackend());

            var resp = auth.Authorize(new AuthRequest("apiUser", "apiPass"));

            Assert.Equal(ApiBackend.GetName(), resp.BackendName);
        }
Пример #4
0
        public void LdapAuthTest()
        {
            var auth = new Authenticator(GetBackend());

            var resp = auth.Authorize(new AuthRequest("ldapUsername", "ldapPassword"));

            Assert.Equal(LdapBackend.GetName(), resp.BackendName);
        }