Package org.apache.xml.security.stax.ext
Class XMLSec
- java.lang.Object
-
- org.apache.xml.security.stax.ext.XMLSec
-
public class XMLSec extends java.lang.Object
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 Constructor Description XMLSec()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static InboundXMLSec
getInboundWSSec(XMLSecurityProperties securityProperties)
Creates and configures an inbound streaming security enginestatic OutboundXMLSec
getOutboundXMLSec(XMLSecurityProperties securityProperties)
Creates and configures an outbound streaming security enginestatic void
init()
static XMLSecurityProperties
validateAndApplyDefaultsToInboundSecurityProperties(XMLSecurityProperties securityProperties)
Validates the user supplied configuration and applies default values as appropriate for the inbound security enginestatic XMLSecurityProperties
validateAndApplyDefaultsToOutboundSecurityProperties(XMLSecurityProperties securityProperties)
Validates the user supplied configuration and applies default values as appropriate for the outbound security engine
-
-
-
Method Detail
-
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
-
-