com.xpn.xwiki.user.impl.xwiki
Class MyFormAuthenticator
java.lang.Object
org.securityfilter.authenticator.FormAuthenticator
com.xpn.xwiki.user.impl.xwiki.MyFormAuthenticator
- All Implemented Interfaces:
- org.securityfilter.authenticator.Authenticator, XWikiAuthenticator
- public class MyFormAuthenticator
- extends org.securityfilter.authenticator.FormAuthenticator
- implements XWikiAuthenticator
Field Summary |
private static org.apache.commons.logging.Log |
log
|
Fields inherited from class org.securityfilter.authenticator.FormAuthenticator |
DEFAULT_LOGIN_SUBMIT_PATTERN, defaultPage, errorPage, errorPagePattern, FORM_PASSWORD, FORM_REMEMBERME, FORM_USERNAME, LOGIN_SUBMIT_PATTERN_KEY, loginPage, loginPagePattern, loginSubmitPattern, logoutPagePattern, persistentLoginManager, realm |
Method Summary |
static java.security.Principal |
authenticate(java.lang.String username,
java.lang.String password,
XWikiContext context)
|
private java.lang.String |
getContinueToURL(javax.servlet.http.HttpServletRequest request)
FormAuthenticator has a special case where the user should be sent to a default page if the user
spontaneously submits a login request. |
boolean |
processLogin(org.securityfilter.filter.SecurityRequestWrapper request,
javax.servlet.http.HttpServletResponse response)
|
boolean |
processLogin(org.securityfilter.filter.SecurityRequestWrapper request,
javax.servlet.http.HttpServletResponse response,
XWikiContext context)
Process any login information that was included in the request, if any. |
void |
showLogin(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
XWikiContext context)
Show the login page. |
Methods inherited from class org.securityfilter.authenticator.FormAuthenticator |
bypassSecurityForThisRequest, getAuthMethod, init, processLogout, showLogin |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.securityfilter.authenticator.Authenticator |
bypassSecurityForThisRequest, getAuthMethod, init, processLogout, showLogin |
log
private static final org.apache.commons.logging.Log log
MyFormAuthenticator
public MyFormAuthenticator()
showLogin
public void showLogin(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
XWikiContext context)
throws java.io.IOException
- Show the login page.
- Specified by:
showLogin
in interface XWikiAuthenticator
- Parameters:
request
- the current requestresponse
- the current response
- Throws:
java.io.IOException
processLogin
public boolean processLogin(org.securityfilter.filter.SecurityRequestWrapper request,
javax.servlet.http.HttpServletResponse response)
throws java.lang.Exception
- Specified by:
processLogin
in interface org.securityfilter.authenticator.Authenticator
- Throws:
java.lang.Exception
processLogin
public boolean processLogin(org.securityfilter.filter.SecurityRequestWrapper request,
javax.servlet.http.HttpServletResponse response,
XWikiContext context)
throws java.lang.Exception
- Process any login information that was included in the request, if any.
Returns true if SecurityFilter should abort further processing after the method completes (for example, if a
redirect was sent as part of the login processing).
- Specified by:
processLogin
in interface XWikiAuthenticator
- Parameters:
request
- response
-
- Returns:
- true if the filter should return after this method ends, false otherwise
- Throws:
java.lang.Exception
getContinueToURL
private java.lang.String getContinueToURL(javax.servlet.http.HttpServletRequest request)
- FormAuthenticator has a special case where the user should be sent to a default page if the user
spontaneously submits a login request.
- Parameters:
request
-
- Returns:
- a URL to send the user to after logging in
authenticate
public static java.security.Principal authenticate(java.lang.String username,
java.lang.String password,
XWikiContext context)
throws XWikiException
- Throws:
XWikiException
Copyright 2003 Ludovic Dubost