org.jboss.soa.esb.services.security.auth.ws
Class WSSecurityInfoExtractor

java.lang.Object
  extended by org.jboss.soa.esb.services.security.auth.ws.WSSecurityInfoExtractor
All Implemented Interfaces:
SecurityInfoExtractor<java.lang.String>

public class WSSecurityInfoExtractor
extends java.lang.Object
implements SecurityInfoExtractor<java.lang.String>

WSSecurityInfoExtractor extracts security related information from a SOAP security header.

If the security element contains a 'UsernameToken' element this will be extraced into a principal with the username and a credential being the password represented as a character array.

Author:
Daniel Bevenius

Constructor Summary
WSSecurityInfoExtractor()
          Creates an instance using the default Smooks config file.
WSSecurityInfoExtractor(java.lang.String configFile)
          Creates an instance of Smooks using the passed in config file.
 
Method Summary
 AuthenticationRequest extractSecurityInfo(java.lang.String soap)
          Extracts UsernameToken element is one exists and creates a Principal with the username and sets a Credential using the password.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WSSecurityInfoExtractor

public WSSecurityInfoExtractor()
Creates an instance using the default Smooks config file.


WSSecurityInfoExtractor

public WSSecurityInfoExtractor(java.lang.String configFile)
Creates an instance of Smooks using the passed in config file.

Parameters:
configFile - - the Smooks config file to use.
Method Detail

extractSecurityInfo

public AuthenticationRequest extractSecurityInfo(java.lang.String soap)
Extracts UsernameToken element is one exists and creates a Principal with the username and sets a Credential using the password. The type of the Credential is a character array.

If the SOAP message contains a BinarySecurityToken this will be extracted and added as a Credential.

Specified by:
extractSecurityInfo in interface SecurityInfoExtractor<java.lang.String>
Parameters:
soap - - the soap message represented as a String
Returns:
AuthenticationRequest