info.magnolia.cms.security.auth.callback
Class FormClientCallback

java.lang.Object
  extended by info.magnolia.cms.security.auth.callback.AbstractHttpClientCallback
      extended by info.magnolia.cms.security.auth.callback.FormClientCallback
All Implemented Interfaces:
HttpClientCallback

public class FormClientCallback
extends AbstractHttpClientCallback

Renders a login form using Freemarker and the template configured with loginForm. $Id$


Field Summary
protected  String ADMINCENTRAL_LOGIN_PATH
           
static String ERROR_STRING
           
static String ERROR_STRING_CSRF
           
static String SECURITY_WARNING_URL
           
static String SECURITY_WARNING_URL_FIX
           
static String SECURITY_WARNING_URL_LINK
           
static String SERVICE_CONTACT
           
 
Constructor Summary
FormClientCallback(MagnoliaConfigurationProperties configurationProperties)
           
 
Method Summary
 String getLoginForm()
           
protected  Map<String,Object> getMessages()
          Simply sets "errorString" in case of login exception.
 void handle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Override this method to provide the specific functionality.
protected  boolean isLoginPage(javax.servlet.http.HttpServletRequest request)
          Is the current url the standard login url?
 void setLoginForm(String loginForm)
           
 
Methods inherited from class info.magnolia.cms.security.auth.callback.AbstractHttpClientCallback
accepts, doCallback, getHostPattern, getOriginalUrlPattern, getUrlPattern, getVoters, setHostPattern, setOriginalUrlPattern, setUrlPattern, setVoters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ERROR_STRING

public static final String ERROR_STRING
See Also:
Constant Field Values

SERVICE_CONTACT

public static final String SERVICE_CONTACT
See Also:
Constant Field Values

ERROR_STRING_CSRF

public static final String ERROR_STRING_CSRF
See Also:
Constant Field Values

SECURITY_WARNING_URL

public static final String SECURITY_WARNING_URL
See Also:
Constant Field Values

SECURITY_WARNING_URL_FIX

public static final String SECURITY_WARNING_URL_FIX
See Also:
Constant Field Values

SECURITY_WARNING_URL_LINK

public static final String SECURITY_WARNING_URL_LINK
See Also:
Constant Field Values

ADMINCENTRAL_LOGIN_PATH

protected final String ADMINCENTRAL_LOGIN_PATH
See Also:
Constant Field Values
Constructor Detail

FormClientCallback

@Inject
public FormClientCallback(MagnoliaConfigurationProperties configurationProperties)
Method Detail

isLoginPage

protected boolean isLoginPage(javax.servlet.http.HttpServletRequest request)
Is the current url the standard login url?


handle

public void handle(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
Description copied from class: AbstractHttpClientCallback
Override this method to provide the specific functionality. This implementation is only kept for backwards compatibility with versions prior to 4.5, and merely delegates the call to AbstractHttpClientCallback.doCallback(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse).

Specified by:
handle in interface HttpClientCallback
Overrides:
handle in class AbstractHttpClientCallback

getLoginForm

public String getLoginForm()

setLoginForm

public void setLoginForm(String loginForm)

getMessages

protected Map<String,Object> getMessages()
Simply sets "errorString" in case of login exception. Sets csrfError if the ATTRIBUTE_POSSIBLE_CSRF attribute is set. Override this to pass more objects to the freemarker template.

Returns:
an empty map


Copyright © 2003–2014 Magnolia International Ltd.. All rights reserved.