Package org.apache.wss4j.stax.test
Class UsernameTokenTest
- java.lang.Object
-
- org.apache.wss4j.stax.test.AbstractTestBase
-
- org.apache.wss4j.stax.test.UsernameTokenTest
-
public class UsernameTokenTest extends AbstractTestBase
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.wss4j.stax.test.AbstractTestBase
AbstractTestBase.TestSecurityEventListener
-
-
Field Summary
-
Fields inherited from class org.apache.wss4j.stax.test.AbstractTestBase
documentBuilderFactory, SECURED_DOCUMENT, TRANSFORMER_FACTORY, xmlInputFactory
-
-
Constructor Summary
Constructors Constructor Description UsernameTokenTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
testDefaultConfigurationInbound()
void
testDefaultConfigurationOutbound()
void
testFutureCreated()
This is a test for processing a UsernameToken where the "Created" element is in the future.void
testInboundOutboundPW_NONE()
void
testInboundPW_TEXT()
void
testInboundSign()
void
testInboundTextNonceCreated()
void
testNearFutureCreated()
This is a test for processing a UsernameToken where the "Created" element is in the (near) future.void
testOldUsernameToken()
This is a test for processing an "old" UsernameToken, i.e.void
testOutboundPW_NONE()
void
testOutboundPW_TEXT()
void
testOutboundPW_TEXT_withEmptyPassword(String transmitter)
void
testOutboundSign()
void
testOutboundTextNonceCreated()
void
testPropertiesInbound()
void
testPropertiesOutbound()
void
testReusedNonce(Path tempDir)
void
testWrongUsername()
-
Methods inherited from class org.apache.wss4j.stax.test.AbstractTestBase
doInboundSecurity, doInboundSecurity, doInboundSecurity, doInboundSecurity, doInboundSecurity, doInboundSecurity, doInboundSecurityWithWSS4J, doInboundSecurityWithWSS4J_1, doInboundSecurityWithWSS4J_1, doOutboundSecurity, doOutboundSecurity, doOutboundSecurityWithWSS4J, doOutboundSecurityWithWSS4J_1, getJavaSpecificationVersion, getMessageContext, getXPath
-
-
-
-
Method Detail
-
testDefaultConfigurationInbound
@Test public void testDefaultConfigurationInbound() throws Exception
- Throws:
Exception
-
testReusedNonce
@Test public void testReusedNonce(@TempDir Path tempDir) throws Exception
- Throws:
Exception
-
testOldUsernameToken
@Test public void testOldUsernameToken() throws Exception
This is a test for processing an "old" UsernameToken, 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 a UsernameToken where the "Created" element is in the (near) future. It should be accepted by default when it is created 30 seconds in the future.- Throws:
Exception
-
testFutureCreated
@Test public void testFutureCreated() throws Exception
This is a test for processing a UsernameToken where the "Created" element is in the future. A UsernameToken that is 120 seconds in the future should be rejected by default.- Throws:
Exception
-
testDefaultConfigurationOutbound
@Test public void testDefaultConfigurationOutbound() throws Exception
- Throws:
Exception
-
testOutboundPW_TEXT_withEmptyPassword
@ParameterizedTest @ValueSource(strings={"transmitter","sender","randomUsername"}) public void testOutboundPW_TEXT_withEmptyPassword(String transmitter) throws Exception
- Throws:
Exception
-
testInboundOutboundPW_NONE
@Test public void testInboundOutboundPW_NONE() throws Exception
- Throws:
Exception
-
testInboundTextNonceCreated
@Test public void testInboundTextNonceCreated() throws Exception
- Throws:
Exception
-
testOutboundTextNonceCreated
@Test public void testOutboundTextNonceCreated() throws Exception
- Throws:
Exception
-
testPropertiesOutbound
@Test public void testPropertiesOutbound() throws Exception
- Throws:
Exception
-
-