Class TimestampTest


  • public class TimestampTest
    extends Object
    WS-Security Test Case for Timestamps.
    • Constructor Detail

      • TimestampTest

        public TimestampTest()
    • Method Detail

      • testValidTimestamp

        @Test
        public void testValidTimestamp()
                                throws Exception
        This is a test for processing a valid Timestamp.
        Throws:
        Exception
      • testValidTimestampNoExpires

        @Test
        public void testValidTimestampNoExpires()
                                         throws Exception
        This is a test for processing a valid Timestamp with no expires element
        Throws:
        Exception
      • testInvalidTimestampNoExpires

        @Test
        public void testInvalidTimestampNoExpires()
                                           throws Exception
        Throws:
        Exception
      • testExpiredTimestamp

        @Test
        public void testExpiredTimestamp()
                                  throws Exception
        This is a test for processing an expired Timestamp.
        Throws:
        Exception
      • testOldTimestamp

        @Test
        public void testOldTimestamp()
                              throws Exception
        This is a test for processing an "old" Timestamp, i.e. one with a "Created" element that is out of date
        Throws:
        Exception
      • testNearFutureCreated

        @Test
        public void testNearFutureCreated()
                                   throws Exception
        This is a test for processing an Timestamp where the "Created" element is in the (near) future. It should be accepted by default when it is created 30 seconds in the future, and then rejected once we configure "0 seconds" for future-time-to-live.
        Throws:
        Exception
      • testFutureCreated

        @Test
        public void testFutureCreated()
                               throws Exception
        This is a test for processing an Timestamp where the "Created" element is in the future. A Timestamp that is 120 seconds in the future should be rejected by default.
        Throws:
        Exception
      • testExpiresBeforeCreated

        @Test
        public void testExpiresBeforeCreated()
                                      throws Exception
        This is a test for processing an Timestamp where the "Created" element is greater than the expiration time.
        Throws:
        Exception
      • testMultipleTimestamps

        @Test
        public void testMultipleTimestamps()
                                    throws Exception
        This is a test for processing multiple Timestamps in the security header
        Throws:
        Exception
      • testMultipleCreated

        @Test
        public void testMultipleCreated()
                                 throws Exception
        This is a test for processing an Timestamp where it contains multiple "Created" elements. This Timestamp should be rejected.
        Throws:
        Exception
      • testNoCreated

        @Test
        public void testNoCreated()
                           throws Exception
        This is a test for processing an Timestamp where it contains no "Created" element. This Timestamp should be rejected.
        Throws:
        Exception
      • testMultipleExpires

        @Test
        public void testMultipleExpires()
                                 throws Exception
        This is a test for processing an Timestamp where it contains multiple "Expires" elements. This Timestamp should be rejected.
        Throws:
        Exception
      • testExpiresInFrontOfCreated

        @Test
        public void testExpiresInFrontOfCreated()
                                         throws Exception
        This is a test for processing an Timestamp where it contains an "Expires" element before the Created element. This Timestamp should be rejected as per the BSP spec.
        Throws:
        Exception
      • testCreatedSeconds

        @Test
        public void testCreatedSeconds()
                                throws Exception
        This is a test for processing an Timestamp where it contains a Created element with seconds > 60. This should be rejected as per the BSP spec.
        Throws:
        Exception
      • testCreatedValueType

        @Test
        public void testCreatedValueType()
                                  throws Exception
        This is a test for processing an Timestamp where it contains a Created element with a ValueType. This should be rejected as per the BSP spec.
        Throws:
        Exception
      • testCustomElement

        @Test
        public void testCustomElement()
                               throws Exception
        This is a test for processing an Timestamp where it contains a CustomElement. This should be rejected as per the BSP spec.
        Throws:
        Exception
      • testSpoofedTimestamp

        @Test
        public void testSpoofedTimestamp()
                                  throws Exception
        This is a test to create a "Spoofed" Timestamp (see WSS-441)
        Throws:
        Exception
      • testTimestampNoMilliseconds

        @Test
        public void testTimestampNoMilliseconds()
                                         throws Exception
        Throws:
        Exception
      • testThaiLocaleVerification

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