org.wso2.wsas.security
Class WSS4JUtil
java.lang.Object
org.wso2.wsas.security.WSS4JUtil
- public class WSS4JUtil
- extends java.lang.Object
This is a utility class to be used to extract security information from the
message context IF the WSS4J security module was used to validate the secured
messages.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WSS4JUtil
public WSS4JUtil()
getUsernameTokenPrincipal
public static org.apache.ws.security.WSUsernameTokenPrincipal getUsernameTokenPrincipal(org.apache.axis2.context.MessageContext mc)
throws org.wso2.utils.ServerException
- Returns the UsernameTokenPrincipal from the security results.
- Parameters:
mc
- The message context of the message
- Returns:
- the UsernameTokenPrincipal from the security results as an
org.apache.ws.security.WSUsernameTokenPrincipal
.
If a wsse:UsernameToken was not present in the wsse:Security header then
null
will be returned.
- Throws:
org.wso2.utils.ServerException
- If there are no security results.- See Also:
WSUsernameTokenPrincipal
getPasswordCallBackRefParameter
public static org.apache.axis2.description.Parameter getPasswordCallBackRefParameter(java.lang.String serviceId,
java.lang.String serviceVersion)
getPasswordCallBackRefParameter
public static org.apache.axis2.description.Parameter getPasswordCallBackRefParameter(java.lang.String serviceId)
getClientUsernameTokenHandler
public static org.apache.axis2.description.Parameter getClientUsernameTokenHandler(java.lang.String password)