Class WSSecuritySupport
java.lang.Object
org.opensaml.soap.wssecurity.util.WSSecuritySupport
Helper methods for working with WS-Security.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addWSSE11TokenType
(XMLObject soapObject, String tokenType) Adds awsse11:TokenType
attribute to the given SOAP object.static void
addWSSEUsage
(XMLObject soapObject, String usage) Adds a singlewsse:Usage
value to the given SOAP object.static void
addWSSEUsages
(XMLObject soapObject, List<String> usages) Adds awsse:Usage
attribute to the given SOAP object.static void
Adds awsu:Id
attribute to the given SOAP object.static String
getWSSE11TokenType
(XMLObject soapObject) Gets thewsse11:TokenType
attribute from a given SOAP object.getWSSEUsages
(XMLObject soapObject) Gets the list value of thewsse:Usage
attribute from the given SOAP object.static String
Gets thewsu:Id
attribute from a given SOAP object.
-
Constructor Details
-
WSSecuritySupport
private WSSecuritySupport()Private constructor.
-
-
Method Details
-
addWSUId
Adds awsu:Id
attribute to the given SOAP object.- Parameters:
soapObject
- the SOAP object to add the attribute toid
- the Id value
-
getWSUId
Gets thewsu: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
Adds awsse11:TokenType
attribute to the given SOAP object.- Parameters:
soapObject
- the SOAP object to add the attribute totokenType
- the tokenType value
-
getWSSE11TokenType
Gets thewsse11: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
Adds a singlewsse:Usage
value to the given SOAP object. If an existingwsse:Usage
attribute 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
Adds awsse:Usage
attribute to the given SOAP object.- Parameters:
soapObject
- the SOAP object to add the attribute tousages
- the list of usages to add
-
getWSSEUsages
Gets the list value of thewsse: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
-