Class WSSecuritySupport
- java.lang.Object
-
- org.opensaml.soap.wssecurity.util.WSSecuritySupport
-
public final class WSSecuritySupport extends Object
Helper methods for working with WS-Security.
-
-
Constructor Summary
Constructors Modifier Constructor Description privateWSSecuritySupport()Private constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddWSSE11TokenType(org.opensaml.core.xml.XMLObject soapObject, String tokenType)Adds awsse11:TokenTypeattribute to the given SOAP object.static voidaddWSSEUsage(org.opensaml.core.xml.XMLObject soapObject, String usage)Adds a singlewsse:Usagevalue to the given SOAP object.static voidaddWSSEUsages(org.opensaml.core.xml.XMLObject soapObject, List<String> usages)Adds awsse:Usageattribute to the given SOAP object.static voidaddWSUId(org.opensaml.core.xml.XMLObject soapObject, String id)Adds awsu:Idattribute to the given SOAP object.static StringgetWSSE11TokenType(org.opensaml.core.xml.XMLObject soapObject)Gets thewsse11:TokenTypeattribute from a given SOAP object.static List<String>getWSSEUsages(org.opensaml.core.xml.XMLObject soapObject)Gets the list value of thewsse:Usageattribute from the given SOAP object.static StringgetWSUId(org.opensaml.core.xml.XMLObject soapObject)Gets thewsu:Idattribute from a given SOAP object.
-
-
-
Method Detail
-
addWSUId
public static void addWSUId(org.opensaml.core.xml.XMLObject soapObject, String id)Adds awsu:Idattribute to the given SOAP object.- Parameters:
soapObject- the SOAP object to add the attribute toid- the Id value
-
getWSUId
public static String getWSUId(org.opensaml.core.xml.XMLObject soapObject)
Gets thewsu:Idattribute 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 awsse11:TokenTypeattribute to the given SOAP object.- Parameters:
soapObject- the SOAP object to add the attribute totokenType- the tokenType value
-
getWSSE11TokenType
public static String getWSSE11TokenType(org.opensaml.core.xml.XMLObject soapObject)
Gets thewsse11:TokenTypeattribute 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 singlewsse:Usagevalue to the given SOAP object. If an existingwsse:Usageattribute is present, the given usage will be added to the existing list.- Parameters:
soapObject- the SOAP object to add the attribute tousage- the usage to add
-
addWSSEUsages
public static void addWSSEUsages(org.opensaml.core.xml.XMLObject soapObject, List<String> usages)Adds awsse:Usageattribute to the given SOAP object.- Parameters:
soapObject- the SOAP object to add the attribute tousages- the list of usages to add
-
-