コード例 #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);
        }