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 voidtestAssertionWrapper()voidtestAssertionWrapperNoDocument()voidtestRequiredSubjectConfirmationMethod()voidtestSaml1Action()This test checks that an unsigned SAML1 sender-vouches authentication assertion can be created by the WSHandler implementationvoidtestSAML1AttrAssertion()Test that creates, sends and processes an unsigned SAML 1.1 attribute assertion.voidtestSAML1AuthnAssertion()Test that creates, sends and processes an unsigned SAML 1.1 authentication assertion.voidtestSAML1AuthnAssertionViaElement()Test that creates, sends and processes an unsigned SAML 1.1 authentication assertion.voidtestSAML1AuthnBadIssuerAssertion()Test that creates, sends and processes an unsigned SAML 1.1 authentication assertion.voidtestSAML1AuthzAssertion()Test that creates, sends and processes an unsigned SAML 1.1 authorization assertion.voidtestSAML1Resource()Test that creates, sends and processes an unsigned SAML 1.1 authorization assertion with a Resource URI.voidtestSAML1SubjectLocality()Test that creates, sends and processes an unsigned SAML 1.1 authentication assertion with a user-specified SubjectLocality statement.voidtestSAML1SubjectNameIDFormat()Test that creates, sends and processes an unsigned SAML 1.1 authentication assertion with a user-specified SubjectNameIDFormat.voidtestSAML2Advice()voidtestSAML2AttrAssertion()Test that creates, sends and processes an unsigned SAML 2 attribute assertion.voidtestSAML2AttrAssertionCustomAttribute()Test that creates, sends and processes an unsigned SAML 2 attribute assertion.voidtestSAML2AttrAssertionIntegerAttribute()Test that creates, sends and processes an unsigned SAML 2 attribute assertion.voidtestSAML2AuthnAssertion()Test that creates, sends and processes an unsigned SAML 2 authentication assertion.voidtestSAML2AuthnBadIssuerAssertion()Test that creates, sends and processes an unsigned SAML 2 authentication assertion.voidtestSAML2AuthzAssertion()Test that creates, sends and processes an unsigned SAML 2 authorization assertion.voidtestSAML2EncryptedAssertion()Test that creates, sends and processes an unsigned SAML 2 authentication assertion, which is encrypted in a saml2:EncryptedAssertion Element in the security headervoidtestSAML2EncryptedAssertionNoSTR()voidtestSAML2EncryptedAssertionViaSeparateEncryptedKey()voidtestSAML2IssuerFormat()voidtestSAML2SessionNotOnOrAfter()Test that creates, sends and processes an unsigned SAML 2.0 authentication assertion with a user-specified SessionNotOnOrAfter DateTime.voidtestSAML2SpecialCharacter()voidtestSAML2SubjectConfirmationData()Test that creates, sends and processes an unsigned SAML 2 authentication assertion with SubjectConfirmationData information.voidtestSAML2SubjectConfirmationNameID()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)voidtestSAML2SubjectLocality()Test that creates, sends and processes an unsigned SAML 2 authentication assertion with a user-specified SubjectLocality statement.voidtestSAML2SubjectNameIDFormat()Test that creates, sends and processes an unsigned SAML 2 authentication assertion with a user-specified SubjectNameIDFormat.voidtestSAML2SubjectWithComment()voidtestStandardSubjectConfirmationMethod()voidtestUnsignedBearer()
-
-
-
Method Detail
-
testSAML1AuthnAssertion
@Test public void testSAML1AuthnAssertion() throws ExceptionTest that creates, sends and processes an unsigned SAML 1.1 authentication assertion.- Throws:
Exception
-
testSAML1AuthnAssertionViaElement
@Test public void testSAML1AuthnAssertionViaElement() throws ExceptionTest 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 ExceptionTest that creates, sends and processes an unsigned SAML 1.1 attribute assertion.- Throws:
Exception
-
testSAML1AuthzAssertion
@Test public void testSAML1AuthzAssertion() throws ExceptionTest that creates, sends and processes an unsigned SAML 1.1 authorization assertion.- Throws:
Exception
-
testSAML2AuthnAssertion
@Test public void testSAML2AuthnAssertion() throws ExceptionTest that creates, sends and processes an unsigned SAML 2 authentication assertion.- Throws:
Exception
-
testSAML2AttrAssertion
@Test public void testSAML2AttrAssertion() throws ExceptionTest that creates, sends and processes an unsigned SAML 2 attribute assertion.- Throws:
Exception
-
testSAML2AuthzAssertion
@Test public void testSAML2AuthzAssertion() throws ExceptionTest that creates, sends and processes an unsigned SAML 2 authorization assertion.- Throws:
Exception
-
testSaml1Action
@Test public void testSaml1Action() throws ExceptionThis 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 ExceptionTest 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 ExceptionTest 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 ExceptionTest 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 ExceptionTest that creates, sends and processes an unsigned SAML 2 authentication assertion with a user-specified SubjectNameIDFormat.- Throws:
Exception
-
testSAML1SubjectLocality
@Test public void testSAML1SubjectLocality() throws ExceptionTest 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 ExceptionTest 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 ExceptionTest 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 ExceptionTest that creates, sends and processes an unsigned SAML 1.1 authorization assertion with a Resource URI.- Throws:
Exception
-
testSAML2AttrAssertionCustomAttribute
@Test public void testSAML2AttrAssertionCustomAttribute() throws ExceptionTest 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 ExceptionTest 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 ExceptionTest that creates, sends and processes an unsigned SAML 2 authentication assertion with SubjectConfirmationData information.- Throws:
Exception
-
testSAML2SubjectConfirmationNameID
@Test public void testSAML2SubjectConfirmationNameID() throws ExceptionTest 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 ExceptionTest 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
-
-