com.xpn.xwiki.user.impl.xwiki
Class MyBasicAuthenticator

java.lang.Object
  extended by org.securityfilter.authenticator.BasicAuthenticator
      extended by com.xpn.xwiki.user.impl.xwiki.MyBasicAuthenticator
All Implemented Interfaces:
XWikiAuthenticator, org.securityfilter.authenticator.Authenticator

public class MyBasicAuthenticator
extends org.securityfilter.authenticator.BasicAuthenticator
implements XWikiAuthenticator


Field Summary
 
Fields inherited from class org.securityfilter.authenticator.BasicAuthenticator
LOGIN_ATTEMPTS, LOGIN_FAILED_MESSAGE, MAX_ATTEMPTS, realm, realmName
 
Constructor Summary
MyBasicAuthenticator()
           
 
Method Summary
static Principal authenticate(String username, String password, XWikiContext context)
           
static Principal checkLogin(org.securityfilter.filter.SecurityRequestWrapper request, javax.servlet.http.HttpServletResponse response, XWikiContext context)
           
static String decodeBasicAuthorizationString(String authorization)
          Decode the BASIC authorization string.
static String parsePassword(String decoded)
          Parse the password out of the decoded BASIC authorization header string.
static String parseUsername(String decoded)
          Parse the user name out of the BASIC authorization header string.
 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)
           
 boolean processLogin(String username, String password, String rememberme, org.securityfilter.filter.SecurityRequestWrapper request, javax.servlet.http.HttpServletResponse response, XWikiContext context)
           
static void showLogin(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String realmName)
           
 void showLogin(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, XWikiContext context)
           
 
Methods inherited from class org.securityfilter.authenticator.BasicAuthenticator
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
 

Constructor Detail

MyBasicAuthenticator

public MyBasicAuthenticator()
Method Detail

processLogin

public boolean processLogin(org.securityfilter.filter.SecurityRequestWrapper request,
                            javax.servlet.http.HttpServletResponse response)
                     throws Exception
Specified by:
processLogin in interface org.securityfilter.authenticator.Authenticator
Overrides:
processLogin in class org.securityfilter.authenticator.BasicAuthenticator
Throws:
Exception

processLogin

public boolean processLogin(org.securityfilter.filter.SecurityRequestWrapper request,
                            javax.servlet.http.HttpServletResponse response,
                            XWikiContext context)
                     throws Exception
Specified by:
processLogin in interface XWikiAuthenticator
Throws:
Exception

processLogin

public boolean processLogin(String username,
                            String password,
                            String rememberme,
                            org.securityfilter.filter.SecurityRequestWrapper request,
                            javax.servlet.http.HttpServletResponse response,
                            XWikiContext context)
                     throws Exception
Specified by:
processLogin in interface XWikiAuthenticator
Throws:
Exception

checkLogin

public static Principal checkLogin(org.securityfilter.filter.SecurityRequestWrapper request,
                                   javax.servlet.http.HttpServletResponse response,
                                   XWikiContext context)
                            throws Exception
Throws:
Exception

parseUsername

public static String parseUsername(String decoded)
Parse the user name out of the BASIC authorization header string.

Parameters:
decoded -
Returns:
user name parsed out of decoded string

parsePassword

public static String parsePassword(String decoded)
Parse the password out of the decoded BASIC authorization header string.

Parameters:
decoded -
Returns:
password parsed out of decoded string

decodeBasicAuthorizationString

public static String decodeBasicAuthorizationString(String authorization)
Decode the BASIC authorization string.

Parameters:
authorization -
Returns:
decoded string

authenticate

public static Principal authenticate(String username,
                                     String password,
                                     XWikiContext context)
                              throws XWikiException
Throws:
XWikiException

showLogin

public static void showLogin(javax.servlet.http.HttpServletRequest request,
                             javax.servlet.http.HttpServletResponse response,
                             String realmName)
                      throws IOException
Throws:
IOException

showLogin

public void showLogin(javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse response,
                      XWikiContext context)
               throws IOException
Specified by:
showLogin in interface XWikiAuthenticator
Throws:
IOException


Copyright © 2004-2013 XWiki. All Rights Reserved.