Package org.apache.xml.security.stax.ext
Class XMLSec
java.lang.Object
org.apache.xml.security.stax.ext.XMLSec
This is the central class of the streaming XML-security framework.
Instances of the inbound and outbound security streams can be retrieved
with this class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic InboundXMLSecgetInboundWSSec(XMLSecurityProperties securityProperties) Creates and configures an inbound streaming security enginestatic OutboundXMLSecgetOutboundXMLSec(XMLSecurityProperties securityProperties) Creates and configures an outbound streaming security enginestatic voidinit()static XMLSecurityPropertiesvalidateAndApplyDefaultsToInboundSecurityProperties(XMLSecurityProperties securityProperties) Validates the user supplied configuration and applies default values as appropriate for the inbound security enginestatic XMLSecurityPropertiesvalidateAndApplyDefaultsToOutboundSecurityProperties(XMLSecurityProperties securityProperties) Validates the user supplied configuration and applies default values as appropriate for the outbound security engine
-
Constructor Details
-
XMLSec
public XMLSec()
-
-
Method Details
-
init
public static void init() -
getOutboundXMLSec
public static OutboundXMLSec getOutboundXMLSec(XMLSecurityProperties securityProperties) throws XMLSecurityException Creates and configures an outbound streaming security engine- Parameters:
securityProperties- The user-defined security configuration- Returns:
- A new OutboundXMLSec
- Throws:
XMLSecurityException- if the initialisation failedXMLSecurityConfigurationException- if the configuration is invalid
-
getInboundWSSec
public static InboundXMLSec getInboundWSSec(XMLSecurityProperties securityProperties) throws XMLSecurityException Creates and configures an inbound streaming security engine- Parameters:
securityProperties- The user-defined security configuration- Returns:
- A new InboundWSSec
- Throws:
XMLSecurityException- if the initialisation failedXMLSecurityConfigurationException- if the configuration is invalid
-
validateAndApplyDefaultsToOutboundSecurityProperties
public static XMLSecurityProperties validateAndApplyDefaultsToOutboundSecurityProperties(XMLSecurityProperties securityProperties) throws XMLSecurityConfigurationException Validates the user supplied configuration and applies default values as appropriate for the outbound security engine- Parameters:
securityProperties- The configuration to validate- Returns:
- The validated configuration
- Throws:
XMLSecurityConfigurationException- if the configuration is invalid
-
validateAndApplyDefaultsToInboundSecurityProperties
public static XMLSecurityProperties validateAndApplyDefaultsToInboundSecurityProperties(XMLSecurityProperties securityProperties) throws XMLSecurityConfigurationException Validates the user supplied configuration and applies default values as appropriate for the inbound security engine- Parameters:
securityProperties- The configuration to validate- Returns:
- The validated configuration
- Throws:
XMLSecurityConfigurationException- if the configuration is invalid
-