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 voidaddWSSE11TokenType(XMLObject soapObject, String tokenType) Adds awsse11:TokenTypeattribute to the given SOAP object.static voidaddWSSEUsage(XMLObject soapObject, String usage) Adds a singlewsse:Usagevalue to the given SOAP object.static voidaddWSSEUsages(XMLObject soapObject, List<String> usages) Adds awsse:Usageattribute to the given SOAP object.static voidAdds awsu:Idattribute to the given SOAP object.static StringgetWSSE11TokenType(XMLObject soapObject) Gets thewsse11:TokenTypeattribute from a given SOAP object.getWSSEUsages(XMLObject soapObject) Gets the list value of thewsse:Usageattribute from the given SOAP object.static StringGets thewsu:Idattribute from a given SOAP object.
-
Constructor Details
-
WSSecuritySupport
private WSSecuritySupport()Private constructor.
-
-
Method Details
-
addWSUId
Adds awsu:Idattribute to the given SOAP object.- Parameters:
soapObject- the SOAP object to add the attribute toid- the Id value
-
getWSUId
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
Adds awsse11:TokenTypeattribute to the given SOAP object.- Parameters:
soapObject- the SOAP object to add the attribute totokenType- the tokenType value
-
getWSSE11TokenType
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
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
Adds awsse:Usageattribute 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:Usageattribute 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
-