Example #1
0
        public virtual void TestGetSimpleAuthDefaultConfiguration()
        {
            AuthFilter filter = new AuthFilter();
            IDictionary <string, string> m = new Dictionary <string, string>();
            FilterConfig config            = new TestAuthFilter.DummyFilterConfig(m);
            Properties   p = filter.GetConfiguration("random", config);

            NUnit.Framework.Assert.AreEqual("true", p.GetProperty(PseudoAuthenticationHandler
                                                                  .AnonymousAllowed));
        }
Example #2
0
        public virtual void TestGetConfiguration()
        {
            AuthFilter filter = new AuthFilter();
            IDictionary <string, string> m = new Dictionary <string, string>();

            m[DFSConfigKeys.DfsWebAuthenticationKerberosPrincipalKey] = "xyz/thehost@REALM";
            m[DFSConfigKeys.DfsWebAuthenticationKerberosKeytabKey]    = "thekeytab";
            FilterConfig config = new TestAuthFilter.DummyFilterConfig(m);
            Properties   p      = filter.GetConfiguration("random", config);

            NUnit.Framework.Assert.AreEqual("xyz/thehost@REALM", p.GetProperty("kerberos.principal"
                                                                               ));
            NUnit.Framework.Assert.AreEqual("thekeytab", p.GetProperty("kerberos.keytab"));
            NUnit.Framework.Assert.AreEqual("true", p.GetProperty(PseudoAuthenticationHandler
                                                                  .AnonymousAllowed));
        }