public void DefaultValues ()
		{
			MyUserNameSecurityTokenParameters tp = new MyUserNameSecurityTokenParameters ();
			Assert.AreEqual (SecurityTokenInclusionMode.AlwaysToRecipient, tp.InclusionMode, "#1");
			Assert.AreEqual (SecurityTokenReferenceStyle.Internal, tp.ReferenceStyle, "#2");
			Assert.AreEqual (false, tp.RequireDerivedKeys, "#3");
			Assert.AreEqual (false, tp.HasAsymmetricKeyEx, "#4");
			Assert.AreEqual (true, tp.SupportsClientAuthenticationEx, "#5");
			Assert.AreEqual (true, tp.SupportsClientWindowsIdentityEx, "#6");
			Assert.AreEqual (false, tp.SupportsServerAuthenticationEx, "#7");
		}
Exemplo n.º 2
0
        public void DefaultValues()
        {
            MyUserNameSecurityTokenParameters tp = new MyUserNameSecurityTokenParameters();

            Assert.AreEqual(SecurityTokenInclusionMode.AlwaysToRecipient, tp.InclusionMode, "#1");
            Assert.AreEqual(SecurityTokenReferenceStyle.Internal, tp.ReferenceStyle, "#2");
            Assert.AreEqual(false, tp.RequireDerivedKeys, "#3");
            Assert.AreEqual(false, tp.HasAsymmetricKeyEx, "#4");
            Assert.AreEqual(true, tp.SupportsClientAuthenticationEx, "#5");
            Assert.AreEqual(true, tp.SupportsClientWindowsIdentityEx, "#6");
            Assert.AreEqual(false, tp.SupportsServerAuthenticationEx, "#7");
        }
Exemplo n.º 3
0
        public void CreateKeyIdentifierClause()
        {
            MyUserNameSecurityTokenParameters p =
                new MyUserNameSecurityTokenParameters();
            UserNameSecurityToken token =
                new UserNameSecurityToken("mono", "pass");
            SecurityKeyIdentifierClause c = p.CreateKeyClause(token, SecurityTokenReferenceStyle.Internal);

            Assert.IsTrue(c is LocalIdKeyIdentifierClause, "#1");

            try {
                p.CreateKeyClause(token, SecurityTokenReferenceStyle.External);
                Assert.Fail("External identifier clause cannot be created.");
            } catch (NotSupportedException) {
            }
        }
		public void CreateKeyIdentifierClause ()
		{
			MyUserNameSecurityTokenParameters p =
				new MyUserNameSecurityTokenParameters ();
			UserNameSecurityToken token =
				new UserNameSecurityToken ("mono", "pass");
			SecurityKeyIdentifierClause c = p.CreateKeyClause (token, SecurityTokenReferenceStyle.Internal);
			Assert.IsTrue (c is LocalIdKeyIdentifierClause, "#1");

			try {
				p.CreateKeyClause (token, SecurityTokenReferenceStyle.External);
				Assert.Fail ("External identifier clause cannot be created.");
			} catch (NotSupportedException) {
			}
		}