org.surfnet.oaaas.authentication
Class FormLoginAuthenticator

java.lang.Object
  extended by org.surfnet.oaaas.auth.AbstractFilter
      extended by org.surfnet.oaaas.auth.AbstractAuthenticator
          extended by org.surfnet.oaaas.authentication.FormLoginAuthenticator
All Implemented Interfaces:
javax.servlet.Filter

@Named(value="formAuthenticator")
public class FormLoginAuthenticator
extends AbstractAuthenticator

AbstractAuthenticator that redirects to a form. Note that other implementations can go wild because they have access to the HttpServletRequest and HttpServletResponse.


Field Summary
 
Fields inherited from class org.surfnet.oaaas.auth.AbstractAuthenticator
PRINCIPAL
 
Fields inherited from class org.surfnet.oaaas.auth.AbstractFilter
AUTH_STATE, RETURN_URI
 
Constructor Summary
FormLoginAuthenticator()
           
 
Method Summary
 void authenticate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain chain, String authStateValue, String returnUri)
           
 boolean canCommence(javax.servlet.http.HttpServletRequest request)
           
protected  void processForm(javax.servlet.http.HttpServletRequest request)
          Hook for actually validating the username/ password against a database, ldap, external webservice or whatever to perform authentication
 
Methods inherited from class org.surfnet.oaaas.auth.AbstractAuthenticator
destroy, doFilter, init, setPrincipal
 
Methods inherited from class org.surfnet.oaaas.auth.AbstractFilter
getAuthStateValue, getReturnUri, setAuthStateValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormLoginAuthenticator

public FormLoginAuthenticator()
Method Detail

canCommence

public boolean canCommence(javax.servlet.http.HttpServletRequest request)
Specified by:
canCommence in class AbstractAuthenticator

authenticate

public void authenticate(javax.servlet.http.HttpServletRequest request,
                         javax.servlet.http.HttpServletResponse response,
                         javax.servlet.FilterChain chain,
                         String authStateValue,
                         String returnUri)
                  throws IOException,
                         javax.servlet.ServletException
Specified by:
authenticate in class AbstractAuthenticator
Throws:
IOException
javax.servlet.ServletException

processForm

protected void processForm(javax.servlet.http.HttpServletRequest request)
Hook for actually validating the username/ password against a database, ldap, external webservice or whatever to perform authentication

Parameters:
request - the HttpServletRequest


Copyright © 2012-2013 SURFnet bv, The Netherlands. All Rights Reserved.