org.mule.security
Class UsernamePasswordAuthenticationFilter

java.lang.Object
  extended by org.mule.security.AbstractSecurityFilter
      extended by org.mule.security.AbstractAuthenticationFilter
          extended by org.mule.security.UsernamePasswordAuthenticationFilter
All Implemented Interfaces:
MuleContextAware, Initialisable, AuthenticationFilter, SecurityFilter

public class UsernamePasswordAuthenticationFilter
extends AbstractAuthenticationFilter

Performs authentication based on a username and password. The username and password are retrieved from the MuleMessage based on expressions specified via the username and password setters. These are then used to create a DefaultMuleAuthentication object which is passed to the authenticate method of the SecurityManager.


Field Summary
protected static Log logger
          logger used by this class
 
Fields inherited from class org.mule.security.AbstractSecurityFilter
muleContext, securityManager
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Constructor Summary
UsernamePasswordAuthenticationFilter()
           
 
Method Summary
 void authenticate(MuleEvent event)
          Authenticates the current message.
protected  Authentication getAuthenticationToken(MuleEvent event)
           
 String getPassword()
           
 String getUsername()
           
 void setPassword(String password)
           
 void setUsername(String username)
           
 
Methods inherited from class org.mule.security.AbstractAuthenticationFilter
doFilter, getCredentialsAccessor, isAuthenticate, setAuthenticate, setCredentialsAccessor
 
Methods inherited from class org.mule.security.AbstractSecurityFilter
doInitialise, getSecurityManager, getSecurityProviders, initialise, setMuleContext, setSecurityManager, setSecurityProviders, updatePayload
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mule.api.security.SecurityFilter
getSecurityManager, getSecurityProviders, setSecurityManager, setSecurityProviders
 
Methods inherited from interface org.mule.api.lifecycle.Initialisable
initialise
 

Field Detail

logger

protected static final Log logger
logger used by this class

Constructor Detail

UsernamePasswordAuthenticationFilter

public UsernamePasswordAuthenticationFilter()
Method Detail

authenticate

public void authenticate(MuleEvent event)
                  throws SecurityException,
                         SecurityProviderNotFoundException,
                         UnknownAuthenticationTypeException
Authenticates the current message.

Specified by:
authenticate in interface AuthenticationFilter
Specified by:
authenticate in class AbstractAuthenticationFilter
Parameters:
event - the current message recieved
Throws:
SecurityException - if authentication fails
SecurityProviderNotFoundException
UnknownAuthenticationTypeException

getAuthenticationToken

protected Authentication getAuthenticationToken(MuleEvent event)
                                         throws UnauthorisedException
Throws:
UnauthorisedException

getUsername

public String getUsername()

setUsername

public void setUsername(String username)

getPassword

public String getPassword()

setPassword

public void setPassword(String password)


Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.