Class AbstractPolicyTestBase
- java.lang.Object
-
- org.apache.wss4j.stax.test.AbstractTestBase
-
- org.apache.wss4j.policy.stax.test.AbstractPolicyTestBase
-
- Direct Known Subclasses:
AlgorithmSuiteTest
,AsymmetricBindingIntegrationTest
,AsymmetricBindingTest
,ContentEncryptedElementsTest
,DerivedKeyTests
,EncryptedElementsTest
,EncryptedPartsTest
,HttpsTokenTest
,IssuedTokenTest
,KerberosTokenTest
,KeyValueTokenTest
,LayoutTest
,ProtectionOrderTest
,RelTokenTest
,RequiredElementsTest
,RequiredPartsTest
,SamlTokenTest
,SecureConversationTokenTest
,SecurityContextTokenTest
,SignedElementsTest
,SignedPartsTest
,SpnegoContextTokenTest
,SupportingTokensTest
,SymmetricBindingTest
,TokenProtectionTest
,TransportBindingIntegrationTest
,TransportBindingTest
,UsernameTokenTest
,WSP13SpecTest
,X509TokenTest
public class AbstractPolicyTestBase 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 AbstractPolicyTestBase()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PolicyEnforcer
buildAndStartPolicyEngine(String policyString)
protected PolicyEnforcer
buildAndStartPolicyEngine(String policyString, boolean replacePolicyElement)
protected PolicyEnforcer
buildAndStartPolicyEngine(String policyString, boolean replacePolicyElement, List<org.apache.neethi.builders.AssertionBuilder<Element>> customAssertionBuilders)
static SamlAssertionWrapper
createSamlAssertionWrapper(SAMLCallback samlCallback)
DsaKeyValueSecurityTokenImpl
getDsaKeyValueSecurityToken()
ECKeyValueSecurityTokenImpl
getECKeyValueSecurityToken()
HttpsSecurityTokenImpl
getHttpsSecurityToken(org.apache.xml.security.stax.securityToken.SecurityTokenConstants.TokenType tokenType)
KerberosServiceSecurityTokenImpl
getKerberosServiceSecurityToken(org.apache.xml.security.stax.securityToken.SecurityTokenConstants.TokenType tokenType)
RsaKeyValueSecurityTokenImpl
getRsaKeyValueSecurityToken()
X509SecurityTokenImpl
getX509Token(org.apache.xml.security.stax.securityToken.SecurityTokenConstants.TokenType tokenType)
X509SecurityTokenImpl
getX509Token(org.apache.xml.security.stax.securityToken.SecurityTokenConstants.TokenType tokenType, String keyAlias)
protected String
loadResourceAsString(String resource, Charset encoding)
static void
setUp()
-
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
-
buildAndStartPolicyEngine
protected PolicyEnforcer buildAndStartPolicyEngine(String policyString) throws ParserConfigurationException, SAXException, IOException, WSSPolicyException
-
buildAndStartPolicyEngine
protected PolicyEnforcer buildAndStartPolicyEngine(String policyString, boolean replacePolicyElement) throws ParserConfigurationException, SAXException, IOException, WSSPolicyException
-
buildAndStartPolicyEngine
protected PolicyEnforcer buildAndStartPolicyEngine(String policyString, boolean replacePolicyElement, List<org.apache.neethi.builders.AssertionBuilder<Element>> customAssertionBuilders) throws ParserConfigurationException, SAXException, IOException, WSSPolicyException
-
getX509Token
public X509SecurityTokenImpl getX509Token(org.apache.xml.security.stax.securityToken.SecurityTokenConstants.TokenType tokenType) throws Exception
- Throws:
Exception
-
getX509Token
public X509SecurityTokenImpl getX509Token(org.apache.xml.security.stax.securityToken.SecurityTokenConstants.TokenType tokenType, String keyAlias) throws Exception
- Throws:
Exception
-
getKerberosServiceSecurityToken
public KerberosServiceSecurityTokenImpl getKerberosServiceSecurityToken(org.apache.xml.security.stax.securityToken.SecurityTokenConstants.TokenType tokenType) throws Exception
- Throws:
Exception
-
getHttpsSecurityToken
public HttpsSecurityTokenImpl getHttpsSecurityToken(org.apache.xml.security.stax.securityToken.SecurityTokenConstants.TokenType tokenType) throws Exception
- Throws:
Exception
-
getRsaKeyValueSecurityToken
public RsaKeyValueSecurityTokenImpl getRsaKeyValueSecurityToken() throws Exception
- Throws:
Exception
-
getDsaKeyValueSecurityToken
public DsaKeyValueSecurityTokenImpl getDsaKeyValueSecurityToken() throws Exception
- Throws:
Exception
-
getECKeyValueSecurityToken
public ECKeyValueSecurityTokenImpl getECKeyValueSecurityToken() throws Exception
- Throws:
Exception
-
loadResourceAsString
protected String loadResourceAsString(String resource, Charset encoding) throws IOException
- Throws:
IOException
-
createSamlAssertionWrapper
public static SamlAssertionWrapper createSamlAssertionWrapper(SAMLCallback samlCallback) throws WSSecurityException
- Throws:
WSSecurityException
-
-