Class SamlTokenTest


  • public class SamlTokenTest
    extends Object
    Test-case for sending and processing an unsigned (sender vouches) SAML Assertion.
    • Constructor Detail

      • SamlTokenTest

        public SamlTokenTest()
    • Method Detail

      • testSAML1AuthnAssertion

        @Test
        public void testSAML1AuthnAssertion()
                                     throws Exception
        Test that creates, sends and processes an unsigned SAML 1.1 authentication assertion.
        Throws:
        Exception
      • testSAML1AuthnAssertionViaElement

        @Test
        public void testSAML1AuthnAssertionViaElement()
                                               throws Exception
        Test that creates, sends and processes an unsigned SAML 1.1 authentication assertion. It set a DOM Element on the CallbackHandler rather than creating a set of beans for SamlAssertionWrapper to parse.
        Throws:
        Exception
      • testSAML1AttrAssertion

        @Test
        public void testSAML1AttrAssertion()
                                    throws Exception
        Test that creates, sends and processes an unsigned SAML 1.1 attribute assertion.
        Throws:
        Exception
      • testSAML1AuthzAssertion

        @Test
        public void testSAML1AuthzAssertion()
                                     throws Exception
        Test that creates, sends and processes an unsigned SAML 1.1 authorization assertion.
        Throws:
        Exception
      • testSAML2AuthnAssertion

        @Test
        public void testSAML2AuthnAssertion()
                                     throws Exception
        Test that creates, sends and processes an unsigned SAML 2 authentication assertion.
        Throws:
        Exception
      • testSAML2AttrAssertion

        @Test
        public void testSAML2AttrAssertion()
                                    throws Exception
        Test that creates, sends and processes an unsigned SAML 2 attribute assertion.
        Throws:
        Exception
      • testSAML2AuthzAssertion

        @Test
        public void testSAML2AuthzAssertion()
                                     throws Exception
        Test that creates, sends and processes an unsigned SAML 2 authorization assertion.
        Throws:
        Exception
      • testSaml1Action

        @Test
        public void testSaml1Action()
                             throws Exception
        This test checks that an unsigned SAML1 sender-vouches authentication assertion can be created by the WSHandler implementation
        Throws:
        Exception
      • testSAML1AuthnBadIssuerAssertion

        @Test
        public void testSAML1AuthnBadIssuerAssertion()
                                              throws Exception
        Test that creates, sends and processes an unsigned SAML 1.1 authentication assertion. The issuer is different from what the custom Validator is expecting, so it throws an exception.
        Throws:
        Exception
      • testSAML2AuthnBadIssuerAssertion

        @Test
        public void testSAML2AuthnBadIssuerAssertion()
                                              throws Exception
        Test that creates, sends and processes an unsigned SAML 2 authentication assertion. The issuer is different from what the custom Validator is expecting, so it throws an exception.
        Throws:
        Exception
      • testSAML1SubjectNameIDFormat

        @Test
        public void testSAML1SubjectNameIDFormat()
                                          throws Exception
        Test that creates, sends and processes an unsigned SAML 1.1 authentication assertion with a user-specified SubjectNameIDFormat.
        Throws:
        Exception
      • testSAML2SubjectNameIDFormat

        @Test
        public void testSAML2SubjectNameIDFormat()
                                          throws Exception
        Test that creates, sends and processes an unsigned SAML 2 authentication assertion with a user-specified SubjectNameIDFormat.
        Throws:
        Exception
      • testSAML1SubjectLocality

        @Test
        public void testSAML1SubjectLocality()
                                      throws Exception
        Test that creates, sends and processes an unsigned SAML 1.1 authentication assertion with a user-specified SubjectLocality statement.
        Throws:
        Exception
      • testSAML2SessionNotOnOrAfter

        @Test
        public void testSAML2SessionNotOnOrAfter()
                                          throws Exception
        Test that creates, sends and processes an unsigned SAML 2.0 authentication assertion with a user-specified SessionNotOnOrAfter DateTime.
        Throws:
        Exception
      • testSAML2SubjectLocality

        @Test
        public void testSAML2SubjectLocality()
                                      throws Exception
        Test that creates, sends and processes an unsigned SAML 2 authentication assertion with a user-specified SubjectLocality statement.
        Throws:
        Exception
      • testSAML1Resource

        @Test
        public void testSAML1Resource()
                               throws Exception
        Test that creates, sends and processes an unsigned SAML 1.1 authorization assertion with a Resource URI.
        Throws:
        Exception
      • testSAML2AttrAssertionCustomAttribute

        @Test
        public void testSAML2AttrAssertionCustomAttribute()
                                                   throws Exception
        Test that creates, sends and processes an unsigned SAML 2 attribute assertion. The attributeValue has a custom XMLObject (not a String) value.
        Throws:
        Exception
      • testSAML2AttrAssertionIntegerAttribute

        @Test
        public void testSAML2AttrAssertionIntegerAttribute()
                                                    throws Exception
        Test that creates, sends and processes an unsigned SAML 2 attribute assertion. The attributeValue has a custom XMLObject (xsd:type="xsd:int") value.
        Throws:
        Exception
      • testSAML2SubjectConfirmationData

        @Test
        public void testSAML2SubjectConfirmationData()
                                              throws Exception
        Test that creates, sends and processes an unsigned SAML 2 authentication assertion with SubjectConfirmationData information.
        Throws:
        Exception
      • testSAML2SubjectConfirmationNameID

        @Test
        public void testSAML2SubjectConfirmationNameID()
                                                throws Exception
        Test that creates, sends and processes an unsigned SAML 2 authentication assertion with a NameID in the Subject (see https://issues.apache.org/jira/browse/WSS-622)
        Throws:
        Exception
      • testSAML2EncryptedAssertion

        @Test
        public void testSAML2EncryptedAssertion()
                                         throws Exception
        Test that creates, sends and processes an unsigned SAML 2 authentication assertion, which is encrypted in a saml2:EncryptedAssertion Element in the security header
        Throws:
        Exception
      • testSAML2EncryptedAssertionViaSeparateEncryptedKey

        @Test
        public void testSAML2EncryptedAssertionViaSeparateEncryptedKey()
                                                                throws Exception
        Throws:
        Exception
      • testSAML2EncryptedAssertionNoSTR

        @Test
        public void testSAML2EncryptedAssertionNoSTR()
                                              throws Exception
        Throws:
        Exception
      • testAssertionWrapper

        @Test
        public void testAssertionWrapper()
                                  throws Exception
        Throws:
        Exception
      • testAssertionWrapperNoDocument

        @Test
        public void testAssertionWrapperNoDocument()
                                            throws Exception
        Throws:
        Exception
      • testRequiredSubjectConfirmationMethod

        @Test
        public void testRequiredSubjectConfirmationMethod()
                                                   throws Exception
        Throws:
        Exception
      • testStandardSubjectConfirmationMethod

        @Test
        public void testStandardSubjectConfirmationMethod()
                                                   throws Exception
        Throws:
        Exception
      • testUnsignedBearer

        @Test
        public void testUnsignedBearer()
                                throws Exception
        Throws:
        Exception
      • testSAML2Advice

        @Test
        public void testSAML2Advice()
                             throws Exception
        Throws:
        Exception
      • testSAML2SpecialCharacter

        @Test
        public void testSAML2SpecialCharacter()
                                       throws Exception
        Throws:
        Exception
      • testSAML2IssuerFormat

        @Test
        public void testSAML2IssuerFormat()
                                   throws Exception
        Throws:
        Exception
      • testSAML2SubjectWithComment

        @Test
        public void testSAML2SubjectWithComment()
                                         throws Exception
        Throws:
        Exception