Package org.apache.wss4j.dom.saml
Class SamlTokenTest
- java.lang.Object
-
- org.apache.wss4j.dom.saml.SamlTokenTest
-
public class SamlTokenTest extends Object
Test-case for sending and processing an unsigned (sender vouches) SAML Assertion.
-
-
Constructor Summary
Constructors Constructor Description SamlTokenTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
testAssertionWrapper()
void
testAssertionWrapperNoDocument()
void
testRequiredSubjectConfirmationMethod()
void
testSaml1Action()
This test checks that an unsigned SAML1 sender-vouches authentication assertion can be created by the WSHandler implementationvoid
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
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
testSAML2Advice()
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
testSAML2AttrAssertionIntegerAttribute()
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
testSAML2EncryptedAssertion()
Test that creates, sends and processes an unsigned SAML 2 authentication assertion, which is encrypted in a saml2:EncryptedAssertion Element in the security headervoid
testSAML2EncryptedAssertionNoSTR()
void
testSAML2EncryptedAssertionViaSeparateEncryptedKey()
void
testSAML2IssuerFormat()
void
testSAML2SessionNotOnOrAfter()
Test that creates, sends and processes an unsigned SAML 2.0 authentication assertion with a user-specified SessionNotOnOrAfter DateTime.void
testSAML2SpecialCharacter()
void
testSAML2SubjectConfirmationData()
Test that creates, sends and processes an unsigned SAML 2 authentication assertion with SubjectConfirmationData information.void
testSAML2SubjectConfirmationNameID()
Test that creates, sends and processes an unsigned SAML 2 authentication assertion with a NameID in the Subject (see https://issues.apache.org/jira/browse/WSS-622)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.void
testSAML2SubjectWithComment()
void
testStandardSubjectConfirmationMethod()
void
testUnsignedBearer()
-
-
-
Method Detail
-
testSAML1AuthnAssertion
@Test public void testSAML1AuthnAssertion() throws Exception
Test that creates, sends and processes an unsigned SAML 1.1 authentication assertion.- Throws:
Exception
-
testSAML1AuthnAssertionViaElement
@Test public void testSAML1AuthnAssertionViaElement() throws 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 SamlAssertionWrapper to parse.- Throws:
Exception
-
testSAML1AttrAssertion
@Test public void testSAML1AttrAssertion() throws Exception
Test that creates, sends and processes an unsigned SAML 1.1 attribute assertion.- Throws:
Exception
-
testSAML1AuthzAssertion
@Test public void testSAML1AuthzAssertion() throws Exception
Test that creates, sends and processes an unsigned SAML 1.1 authorization assertion.- Throws:
Exception
-
testSAML2AuthnAssertion
@Test public void testSAML2AuthnAssertion() throws Exception
Test that creates, sends and processes an unsigned SAML 2 authentication assertion.- Throws:
Exception
-
testSAML2AttrAssertion
@Test public void testSAML2AttrAssertion() throws Exception
Test that creates, sends and processes an unsigned SAML 2 attribute assertion.- Throws:
Exception
-
testSAML2AuthzAssertion
@Test public void testSAML2AuthzAssertion() throws Exception
Test that creates, sends and processes an unsigned SAML 2 authorization assertion.- Throws:
Exception
-
testSaml1Action
@Test public void testSaml1Action() throws Exception
This test checks that an unsigned SAML1 sender-vouches authentication assertion can be created by the WSHandler implementation- Throws:
Exception
-
testSAML1AuthnBadIssuerAssertion
@Test public void testSAML1AuthnBadIssuerAssertion() throws 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:
Exception
-
testSAML2AuthnBadIssuerAssertion
@Test public void testSAML2AuthnBadIssuerAssertion() throws 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:
Exception
-
testSAML1SubjectNameIDFormat
@Test public void testSAML1SubjectNameIDFormat() throws Exception
Test that creates, sends and processes an unsigned SAML 1.1 authentication assertion with a user-specified SubjectNameIDFormat.- Throws:
Exception
-
testSAML2SubjectNameIDFormat
@Test public void testSAML2SubjectNameIDFormat() throws Exception
Test that creates, sends and processes an unsigned SAML 2 authentication assertion with a user-specified SubjectNameIDFormat.- Throws:
Exception
-
testSAML1SubjectLocality
@Test public void testSAML1SubjectLocality() throws Exception
Test that creates, sends and processes an unsigned SAML 1.1 authentication assertion with a user-specified SubjectLocality statement.- Throws:
Exception
-
testSAML2SessionNotOnOrAfter
@Test public void testSAML2SessionNotOnOrAfter() throws Exception
Test that creates, sends and processes an unsigned SAML 2.0 authentication assertion with a user-specified SessionNotOnOrAfter DateTime.- Throws:
Exception
-
testSAML2SubjectLocality
@Test public void testSAML2SubjectLocality() throws Exception
Test that creates, sends and processes an unsigned SAML 2 authentication assertion with a user-specified SubjectLocality statement.- Throws:
Exception
-
testSAML1Resource
@Test public void testSAML1Resource() throws Exception
Test that creates, sends and processes an unsigned SAML 1.1 authorization assertion with a Resource URI.- Throws:
Exception
-
testSAML2AttrAssertionCustomAttribute
@Test public void testSAML2AttrAssertionCustomAttribute() throws Exception
Test that creates, sends and processes an unsigned SAML 2 attribute assertion. The attributeValue has a custom XMLObject (not a String) value.- Throws:
Exception
-
testSAML2AttrAssertionIntegerAttribute
@Test public void testSAML2AttrAssertionIntegerAttribute() throws Exception
Test that creates, sends and processes an unsigned SAML 2 attribute assertion. The attributeValue has a custom XMLObject (xsd:type="xsd:int") value.- Throws:
Exception
-
testSAML2SubjectConfirmationData
@Test public void testSAML2SubjectConfirmationData() throws Exception
Test that creates, sends and processes an unsigned SAML 2 authentication assertion with SubjectConfirmationData information.- Throws:
Exception
-
testSAML2SubjectConfirmationNameID
@Test public void testSAML2SubjectConfirmationNameID() throws Exception
Test that creates, sends and processes an unsigned SAML 2 authentication assertion with a NameID in the Subject (see https://issues.apache.org/jira/browse/WSS-622)- Throws:
Exception
-
testSAML2EncryptedAssertion
@Test public void testSAML2EncryptedAssertion() throws Exception
Test that creates, sends and processes an unsigned SAML 2 authentication assertion, which is encrypted in a saml2:EncryptedAssertion Element in the security header- Throws:
Exception
-
testSAML2EncryptedAssertionViaSeparateEncryptedKey
@Test public void testSAML2EncryptedAssertionViaSeparateEncryptedKey() throws Exception
- Throws:
Exception
-
testSAML2EncryptedAssertionNoSTR
@Test public void testSAML2EncryptedAssertionNoSTR() throws Exception
- Throws:
Exception
-
testAssertionWrapperNoDocument
@Test public void testAssertionWrapperNoDocument() throws Exception
- Throws:
Exception
-
testRequiredSubjectConfirmationMethod
@Test public void testRequiredSubjectConfirmationMethod() throws Exception
- Throws:
Exception
-
testStandardSubjectConfirmationMethod
@Test public void testStandardSubjectConfirmationMethod() throws Exception
- Throws:
Exception
-
testSAML2SpecialCharacter
@Test public void testSAML2SpecialCharacter() throws Exception
- Throws:
Exception
-
-