Class WSSecuritySupport


  • public final class WSSecuritySupport
    extends Object
    Helper methods for working with WS-Security.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private WSSecuritySupport()
      Private constructor.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void addWSSE11TokenType​(org.opensaml.core.xml.XMLObject soapObject, String tokenType)
      Adds a wsse11:TokenType attribute to the given SOAP object.
      static void addWSSEUsage​(org.opensaml.core.xml.XMLObject soapObject, String usage)
      Adds a single wsse:Usage value to the given SOAP object.
      static void addWSSEUsages​(org.opensaml.core.xml.XMLObject soapObject, List<String> usages)
      Adds a wsse:Usage attribute to the given SOAP object.
      static void addWSUId​(org.opensaml.core.xml.XMLObject soapObject, String id)
      Adds a wsu:Id attribute to the given SOAP object.
      static String getWSSE11TokenType​(org.opensaml.core.xml.XMLObject soapObject)
      Gets the wsse11:TokenType attribute from a given SOAP object.
      static List<String> getWSSEUsages​(org.opensaml.core.xml.XMLObject soapObject)
      Gets the list value of the wsse:Usage attribute from the given SOAP object.
      static String getWSUId​(org.opensaml.core.xml.XMLObject soapObject)
      Gets the wsu:Id attribute from a given SOAP object.
    • Constructor Detail

      • WSSecuritySupport

        private WSSecuritySupport()
        Private constructor.
    • Method Detail

      • addWSUId

        public static void addWSUId​(org.opensaml.core.xml.XMLObject soapObject,
                                    String id)
        Adds a wsu:Id attribute to the given SOAP object.
        Parameters:
        soapObject - the SOAP object to add the attribute to
        id - the Id value
      • getWSUId

        public static String getWSUId​(org.opensaml.core.xml.XMLObject soapObject)
        Gets the wsu:Id attribute from a given SOAP object.
        Parameters:
        soapObject - the SOAP object to add the attribute to
        Returns:
        the value of the Id attribute, or null if not present
      • addWSSE11TokenType

        public static void addWSSE11TokenType​(org.opensaml.core.xml.XMLObject soapObject,
                                              String tokenType)
        Adds a wsse11:TokenType attribute to the given SOAP object.
        Parameters:
        soapObject - the SOAP object to add the attribute to
        tokenType - the tokenType value
      • getWSSE11TokenType

        public static String getWSSE11TokenType​(org.opensaml.core.xml.XMLObject soapObject)
        Gets the wsse11:TokenType attribute from a given SOAP object.
        Parameters:
        soapObject - the SOAP object to add the attribute to
        Returns:
        the value of the tokenType attribute, or null if not present
      • addWSSEUsage

        public static void addWSSEUsage​(org.opensaml.core.xml.XMLObject soapObject,
                                        String usage)
        Adds a single wsse:Usage value to the given SOAP object. If an existing wsse:Usage attribute is present, the given usage will be added to the existing list.
        Parameters:
        soapObject - the SOAP object to add the attribute to
        usage - the usage to add
      • addWSSEUsages

        public static void addWSSEUsages​(org.opensaml.core.xml.XMLObject soapObject,
                                         List<String> usages)
        Adds a wsse:Usage attribute to the given SOAP object.
        Parameters:
        soapObject - the SOAP object to add the attribute to
        usages - the list of usages to add
      • getWSSEUsages

        public static List<String> getWSSEUsages​(org.opensaml.core.xml.XMLObject soapObject)
        Gets the list value of the wsse:Usage attribute from the given SOAP object.
        Parameters:
        soapObject - the SOAP object to add the attribute to
        Returns:
        the list of usages, or null if not present