org.apache.ws.security.saml
Class SamlTokenTest

java.lang.Object
  extended by org.junit.Assert
      extended by org.apache.ws.security.saml.SamlTokenTest

public class SamlTokenTest
extends org.junit.Assert

Test-case for sending and processing an unsigned (sender vouches) SAML Assertion.

Author:
Davanum Srinivas (dims@yahoo.com)

Constructor Summary
SamlTokenTest()
           
 
Method Summary
 void testSaml1Action()
          This test checks that an unsigned SAML1 sender-vouches authentication assertion can be created by the WSHandler implementation
 void testSAML1AttrAssertion()
          Test that creates, sends and processes an unsigned SAML 1.1 attribute assertion.
 void testSAML1AuthnAssertion()
          Test that creates, sends and processes an unsigned SAML 1.1 authentication assertion.
 void testSAML1AuthnAssertionFromProperties()
          Test that creates, sends and processes an unsigned SAML 1 authentication assertion, where the configuration is loaded from a properties file
 void testSAML1AuthnAssertionViaElement()
          Test that creates, sends and processes an unsigned SAML 1.1 authentication assertion.
 void testSAML1AuthnBadIssuerAssertion()
          Test that creates, sends and processes an unsigned SAML 1.1 authentication assertion.
 void testSAML1AuthzAssertion()
          Test that creates, sends and processes an unsigned SAML 1.1 authorization assertion.
 void testSAML1Resource()
          Test that creates, sends and processes an unsigned SAML 1.1 authorization assertion with a Resource URI.
 void testSAML1SubjectLocality()
          Test that creates, sends and processes an unsigned SAML 1.1 authentication assertion with a user-specified SubjectLocality statement.
 void testSAML1SubjectNameIDFormat()
          Test that creates, sends and processes an unsigned SAML 1.1 authentication assertion with a user-specified SubjectNameIDFormat.
 void testSAML2AttrAssertion()
          Test that creates, sends and processes an unsigned SAML 2 attribute assertion.
 void testSAML2AttrAssertionCustomAttribute()
          Test that creates, sends and processes an unsigned SAML 2 attribute assertion.
 void testSAML2AuthnAssertion()
          Test that creates, sends and processes an unsigned SAML 2 authentication assertion.
 void testSAML2AuthnBadIssuerAssertion()
          Test that creates, sends and processes an unsigned SAML 2 authentication assertion.
 void testSAML2AuthzAssertion()
          Test that creates, sends and processes an unsigned SAML 2 authorization assertion.
 void testSAML2SubjectConfirmationData()
          Test that creates, sends and processes an unsigned SAML 2 authentication assertion with SubjectConfirmationData information.
 void testSAML2SubjectLocality()
          Test that creates, sends and processes an unsigned SAML 2 authentication assertion with a user-specified SubjectLocality statement.
 void testSAML2SubjectNameIDFormat()
          Test that creates, sends and processes an unsigned SAML 2 authentication assertion with a user-specified SubjectNameIDFormat.
 
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

SamlTokenTest

public SamlTokenTest()
Method Detail

testSAML1AuthnAssertion

public void testSAML1AuthnAssertion()
                             throws java.lang.Exception
Test that creates, sends and processes an unsigned SAML 1.1 authentication assertion.

Throws:
java.lang.Exception

testSAML1AuthnAssertionFromProperties

public void testSAML1AuthnAssertionFromProperties()
                                           throws java.lang.Exception
Test that creates, sends and processes an unsigned SAML 1 authentication assertion, where the configuration is loaded from a properties file

Throws:
java.lang.Exception

testSAML1AuthnAssertionViaElement

public void testSAML1AuthnAssertionViaElement()
                                       throws java.lang.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 AssertionWrapper to parse.

Throws:
java.lang.Exception

testSAML1AttrAssertion

public void testSAML1AttrAssertion()
                            throws java.lang.Exception
Test that creates, sends and processes an unsigned SAML 1.1 attribute assertion.

Throws:
java.lang.Exception

testSAML1AuthzAssertion

public void testSAML1AuthzAssertion()
                             throws java.lang.Exception
Test that creates, sends and processes an unsigned SAML 1.1 authorization assertion.

Throws:
java.lang.Exception

testSAML2AuthnAssertion

public void testSAML2AuthnAssertion()
                             throws java.lang.Exception
Test that creates, sends and processes an unsigned SAML 2 authentication assertion.

Throws:
java.lang.Exception

testSAML2AttrAssertion

public void testSAML2AttrAssertion()
                            throws java.lang.Exception
Test that creates, sends and processes an unsigned SAML 2 attribute assertion.

Throws:
java.lang.Exception

testSAML2AuthzAssertion

public void testSAML2AuthzAssertion()
                             throws java.lang.Exception
Test that creates, sends and processes an unsigned SAML 2 authorization assertion.

Throws:
java.lang.Exception

testSaml1Action

public void testSaml1Action()
                     throws java.lang.Exception
This test checks that an unsigned SAML1 sender-vouches authentication assertion can be created by the WSHandler implementation

Throws:
java.lang.Exception

testSAML1AuthnBadIssuerAssertion

public void testSAML1AuthnBadIssuerAssertion()
                                      throws java.lang.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:
java.lang.Exception

testSAML2AuthnBadIssuerAssertion

public void testSAML2AuthnBadIssuerAssertion()
                                      throws java.lang.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:
java.lang.Exception

testSAML1SubjectNameIDFormat

public void testSAML1SubjectNameIDFormat()
                                  throws java.lang.Exception
Test that creates, sends and processes an unsigned SAML 1.1 authentication assertion with a user-specified SubjectNameIDFormat.

Throws:
java.lang.Exception

testSAML2SubjectNameIDFormat

public void testSAML2SubjectNameIDFormat()
                                  throws java.lang.Exception
Test that creates, sends and processes an unsigned SAML 2 authentication assertion with a user-specified SubjectNameIDFormat.

Throws:
java.lang.Exception

testSAML1SubjectLocality

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

Throws:
java.lang.Exception

testSAML2SubjectLocality

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

Throws:
java.lang.Exception

testSAML1Resource

public void testSAML1Resource()
                       throws java.lang.Exception
Test that creates, sends and processes an unsigned SAML 1.1 authorization assertion with a Resource URI.

Throws:
java.lang.Exception

testSAML2AttrAssertionCustomAttribute

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

Throws:
java.lang.Exception

testSAML2SubjectConfirmationData

public void testSAML2SubjectConfirmationData()
                                      throws java.lang.Exception
Test that creates, sends and processes an unsigned SAML 2 authentication assertion with SubjectConfirmationData information.

Throws:
java.lang.Exception


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