Package org.apache.wss4j.dom.message
Class TimestampTest
- java.lang.Object
-
- org.apache.wss4j.dom.message.TimestampTest
-
public class TimestampTest extends Object
WS-Security Test Case for Timestamps.
-
-
Constructor Summary
Constructors Constructor Description TimestampTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
testCreatedSeconds()
This is a test for processing an Timestamp where it contains a Created element with seconds > 60.void
testCreatedValueType()
This is a test for processing an Timestamp where it contains a Created element with a ValueType.void
testCustomElement()
This is a test for processing an Timestamp where it contains a CustomElement.void
testExpiredTimestamp()
This is a test for processing an expired Timestamp.void
testExpiresBeforeCreated()
This is a test for processing an Timestamp where the "Created" element is greater than the expiration time.void
testExpiresInFrontOfCreated()
This is a test for processing an Timestamp where it contains an "Expires" element before the Created element.void
testFutureCreated()
This is a test for processing an Timestamp where the "Created" element is in the future.void
testInvalidTimestampNoExpires()
void
testMultipleCreated()
This is a test for processing an Timestamp where it contains multiple "Created" elements.void
testMultipleExpires()
This is a test for processing an Timestamp where it contains multiple "Expires" elements.void
testMultipleTimestamps()
This is a test for processing multiple Timestamps in the security headervoid
testNearFutureCreated()
This is a test for processing an Timestamp where the "Created" element is in the (near) future.void
testNoCreated()
This is a test for processing an Timestamp where it contains no "Created" element.void
testOldTimestamp()
This is a test for processing an "old" Timestamp, i.e.void
testSpoofedTimestamp()
This is a test to create a "Spoofed" Timestamp (see WSS-441)void
testThaiLocaleVerification()
void
testTimestampNoMilliseconds()
void
testValidTimestamp()
This is a test for processing a valid Timestamp.void
testValidTimestampNoExpires()
This is a test for processing a valid Timestamp with no expires element
-
-
-
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
-
-