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

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

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 java.security.Principal authenticate(java.lang.String username, java.lang.String password, XWikiContext context)
           
static java.security.Principal checkLogin(org.securityfilter.filter.SecurityRequestWrapper request, javax.servlet.http.HttpServletResponse response, XWikiContext context)
           
static java.lang.String decodeBasicAuthorizationString(java.lang.String authorization)
          Decode the BASIC authorization string.
static java.lang.String parsePassword(java.lang.String decoded)
          Parse the password out of the decoded BASIC authorization header string.
static java.lang.String parseUsername(java.lang.String decoded)
          Parse the username 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)
           
static void showLogin(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.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 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
Specified by:
processLogin in interface XWikiAuthenticator
Throws:
java.lang.Exception

checkLogin

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

parseUsername

public static java.lang.String parseUsername(java.lang.String decoded)
Parse the username out of the BASIC authorization header string.

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

parsePassword

public static java.lang.String parsePassword(java.lang.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 java.lang.String decodeBasicAuthorizationString(java.lang.String authorization)
Decode the BASIC authorization string.

Parameters:
authorization -
Returns:
decoded string

authenticate

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

showLogin

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

showLogin

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


Copyright 2003 Ludovic Dubost