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 authenticateInbound(MuleEvent event)
          Authenticates the current message.
 void authenticateOutbound(MuleEvent event)
          Authenticates the current message if authenticate is set to true.
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
authenticate, 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

authenticateInbound

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

Specified by:
authenticateInbound 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

authenticateOutbound

public void authenticateOutbound(MuleEvent event)
                          throws SecurityException,
                                 SecurityProviderNotFoundException
Authenticates the current message if authenticate is set to true. This method will always populate the secure context in the session

Specified by:
authenticateOutbound in class AbstractAuthenticationFilter
Parameters:
event - the current event being dispatched
Throws:
SecurityException - if authentication fails
SecurityProviderNotFoundException

getUsername

public String getUsername()

setUsername

public void setUsername(String username)

getPassword

public String getPassword()

setPassword

public void setPassword(String password)


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