Class WSSec


  • public class WSSec
    extends Object
    This is the central class of the streaming webservice-security framework.
    Instances of the inbound and outbound security streams can be retrieved with this class.
    • Constructor Detail

      • WSSec

        public WSSec()
    • Method Detail

      • init

        public static void init()
      • getInboundWSSec

        public static InboundWSSec getInboundWSSec​(WSSSecurityProperties securityProperties,
                                                   boolean initiator)
                                            throws WSSecurityException
        Creates and configures an inbound streaming security engine
        Parameters:
        securityProperties - The user-defined security configuration
        initiator - Whether we are the message initiator or not
        Returns:
        A new InboundWSSec
        Throws:
        WSSecurityException - if the initialisation failed
        WSSConfigurationException - if the configuration is invalid
      • getInboundWSSec

        public static InboundWSSec getInboundWSSec​(WSSSecurityProperties securityProperties,
                                                   boolean initiator,
                                                   boolean returnSecurityError)
                                            throws WSSecurityException
        Creates and configures an inbound streaming security engine
        Parameters:
        securityProperties - The user-defined security configuration
        initiator - Whether we are the message initiator or not
        returnSecurityError - Whether to return the underlying security error or not
        Returns:
        A new InboundWSSec
        Throws:
        WSSecurityException - if the initialisation failed
        WSSConfigurationException - if the configuration is invalid
      • validateAndApplyDefaultsToOutboundSecurityProperties

        public static WSSSecurityProperties validateAndApplyDefaultsToOutboundSecurityProperties​(WSSSecurityProperties securityProperties)
                                                                                          throws WSSConfigurationException
        Validates the user supplied configuration and applies default values as apropriate for the outbound security engine
        Parameters:
        securityProperties - The configuration to validate
        Returns:
        The validated configuration
        Throws:
        WSSConfigurationException - if the configuration is invalid
      • validateAndApplyDefaultsToInboundSecurityProperties

        public static WSSSecurityProperties validateAndApplyDefaultsToInboundSecurityProperties​(WSSSecurityProperties securityProperties)
                                                                                         throws WSSConfigurationException
        Validates the user supplied configuration and applies default values as apropriate for the inbound security engine
        Parameters:
        securityProperties - The configuration to validate
        Returns:
        The validated configuration
        Throws:
        WSSConfigurationException - if the configuration is invalid