示例#1
0
        public void CreateKeyIdentifierClauseWrongToken()
        {
            MyRsaSecurityTokenParameters tp = new MyRsaSecurityTokenParameters();

            tp.CreateKeyClause(
                new UserNameSecurityToken("mono", "mono"),
                SecurityTokenReferenceStyle.External);
        }
示例#2
0
        public void CreateKeyIdentifierClauseNullToken()
        {
            MyRsaSecurityTokenParameters tp = new MyRsaSecurityTokenParameters();

            tp.CreateKeyClause(
                null,
                SecurityTokenReferenceStyle.External);
        }
		public void DefaultValues ()
		{
			MyRsaSecurityTokenParameters tp = new MyRsaSecurityTokenParameters ();
			Assert.AreEqual (SecurityTokenInclusionMode.Never, tp.InclusionMode, "#1");
			Assert.AreEqual (SecurityTokenReferenceStyle.Internal, tp.ReferenceStyle, "#2");
			Assert.AreEqual (true, tp.RequireDerivedKeys, "#3");
			Assert.AreEqual (true, tp.HasAsymmetricKeyEx, "#4");
			Assert.AreEqual (true, tp.SupportsClientAuthenticationEx, "#5");
			Assert.AreEqual (false, tp.SupportsClientWindowsIdentityEx, "#6");
			Assert.AreEqual (true, tp.SupportsServerAuthenticationEx, "#7");
		}
示例#4
0
        public void DefaultValues()
        {
            MyRsaSecurityTokenParameters tp = new MyRsaSecurityTokenParameters();

            Assert.AreEqual(SecurityTokenInclusionMode.Never, tp.InclusionMode, "#1");
            Assert.AreEqual(SecurityTokenReferenceStyle.Internal, tp.ReferenceStyle, "#2");
            Assert.AreEqual(true, tp.RequireDerivedKeys, "#3");
            Assert.AreEqual(true, tp.HasAsymmetricKeyEx, "#4");
            Assert.AreEqual(true, tp.SupportsClientAuthenticationEx, "#5");
            Assert.AreEqual(false, tp.SupportsClientWindowsIdentityEx, "#6");
            Assert.AreEqual(true, tp.SupportsServerAuthenticationEx, "#7");
        }
示例#5
0
        public void CreateKeyIdentifierClause()
        {
            MyRsaSecurityTokenParameters tp = new MyRsaSecurityTokenParameters();
            SecurityKeyIdentifierClause  c  = tp.CreateKeyClause(
                new RsaSecurityToken(RSA.Create()),
                SecurityTokenReferenceStyle.Internal);

            Assert.IsTrue(c is RsaKeyIdentifierClause, "#1");
            c = tp.CreateKeyClause(
                new RsaSecurityToken(RSA.Create()),
                SecurityTokenReferenceStyle.External);
            Assert.IsTrue(c is RsaKeyIdentifierClause, "#2");
        }
		public void CreateKeyIdentifierClauseWrongToken ()
		{
			MyRsaSecurityTokenParameters tp = new MyRsaSecurityTokenParameters ();
			tp.CreateKeyClause (
				new UserNameSecurityToken ("mono", "mono"),
				SecurityTokenReferenceStyle.External);
		}
		public void CreateKeyIdentifierClauseNullToken ()
		{
			MyRsaSecurityTokenParameters tp = new MyRsaSecurityTokenParameters ();
			tp.CreateKeyClause (
				null,
				SecurityTokenReferenceStyle.External);
		}
		public void CreateKeyIdentifierClause ()
		{
			MyRsaSecurityTokenParameters tp = new MyRsaSecurityTokenParameters ();
			SecurityKeyIdentifierClause c = tp.CreateKeyClause (
				new RsaSecurityToken (RSA.Create ()),
				SecurityTokenReferenceStyle.Internal);
			Assert.IsTrue (c is RsaKeyIdentifierClause, "#1");
			c = tp.CreateKeyClause (
				new RsaSecurityToken (RSA.Create ()),
				SecurityTokenReferenceStyle.External);
			Assert.IsTrue (c is RsaKeyIdentifierClause, "#2");
		}