コード例 #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);
        }
コード例 #3
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");
		}
コード例 #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");
        }
コード例 #6
0
		public void CreateKeyIdentifierClauseWrongToken ()
		{
			MyRsaSecurityTokenParameters tp = new MyRsaSecurityTokenParameters ();
			tp.CreateKeyClause (
				new UserNameSecurityToken ("mono", "mono"),
				SecurityTokenReferenceStyle.External);
		}
コード例 #7
0
		public void CreateKeyIdentifierClauseNullToken ()
		{
			MyRsaSecurityTokenParameters tp = new MyRsaSecurityTokenParameters ();
			tp.CreateKeyClause (
				null,
				SecurityTokenReferenceStyle.External);
		}
コード例 #8
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");
		}