org.apache.ws.security.validate
Class ValidatorTest

java.lang.Object
  extended by org.junit.Assert
      extended by org.apache.ws.security.validate.ValidatorTest

public class ValidatorTest
extends org.junit.Assert

A test-case for Validators, check for non-standard behaviour by plugging in Validator implementations.


Constructor Summary
ValidatorTest()
           
 
Method Summary
 void testExpiredTimestamp()
          This is a test for processing an expired Timestamp.
 void testTransformedBST()
          In this test, a BinarySecurityToken is added to the SOAP header.
 void testUntrustedSignature()
          Test for processing an untrusted signature
 void testUsernameTokenBadText()
          Test that adds a UserNameToken with (bad) password text to a WS-Security envelope
 void testValidatedBSTSignature()
          In this test, a SOAP request is constructed where the SOAP body is signed via a BinarySecurityToken.
 
Methods inherited from class org.junit.Assert
assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertThat, assertThat, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidatorTest

public ValidatorTest()
Method Detail

testExpiredTimestamp

public void testExpiredTimestamp()
                          throws java.lang.Exception
This is a test for processing an expired Timestamp.

Throws:
java.lang.Exception

testUntrustedSignature

public void testUntrustedSignature()
                            throws java.lang.Exception
Test for processing an untrusted signature

Throws:
java.lang.Exception

testUsernameTokenBadText

public void testUsernameTokenBadText()
                              throws java.lang.Exception
Test that adds a UserNameToken with (bad) password text to a WS-Security envelope

Throws:
java.lang.Exception

testTransformedBST

public void testTransformedBST()
                        throws java.lang.Exception
In this test, a BinarySecurityToken is added to the SOAP header. A custom processor validates the BST and transforms it into a SAML Assertion.

Throws:
java.lang.Exception

testValidatedBSTSignature

public void testValidatedBSTSignature()
                               throws java.lang.Exception
In this test, a SOAP request is constructed where the SOAP body is signed via a BinarySecurityToken. The receiving side does not trust the BST, and so the test fails. The second time, a custom Validator (NoOpValidator for this case) is installed for the BST, and so trust verification passes on the Signature.

Throws:
java.lang.Exception


Copyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.