Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

Constructor Summary
`WSS4JUtil()`

Method Summary
`static org.apache.axis2.description.Parameter` | `getClientUsernameTokenHandler(java.lang.String password)`
`static org.apache.axis2.description.Parameter` | `getPasswordCallBackRefParameter(java.lang.String serviceId)`
`static org.apache.axis2.description.Parameter` | `getPasswordCallBackRefParameter(java.lang.String serviceId, java.lang.String serviceVersion)`
`static org.apache.ws.security.WSUsernameTokenPrincipal` | `getUsernameTokenPrincipal(org.apache.axis2.context.MessageContext mc)` Returns the UsernameTokenPrincipal from the security results.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### WSS4JUtil

    public WSS4JUtil()

Method Detail

### 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)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD