Package com.xpn.xwiki.user.impl.xwiki
Class MyBasicAuthenticator
- java.lang.Object
-
- org.securityfilter.authenticator.BasicAuthenticator
-
- 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
-
-
Constructor Summary
Constructors Constructor Description MyBasicAuthenticator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Principalauthenticate(String username, String password, XWikiContext context)static PrincipalcheckLogin(org.securityfilter.filter.SecurityRequestWrapper request, javax.servlet.http.HttpServletResponse response, XWikiContext context)static StringdecodeBasicAuthorizationString(String authorization)Decode the BASIC authorization string.static StringparsePassword(String decoded)Parse the password out of the decoded BASIC authorization header string.static StringparseUsername(String decoded)Parse the user name out of the BASIC authorization header string.booleanprocessLogin(String username, String password, String rememberme, org.securityfilter.filter.SecurityRequestWrapper request, javax.servlet.http.HttpServletResponse response, XWikiContext context)booleanprocessLogin(org.securityfilter.filter.SecurityRequestWrapper request, javax.servlet.http.HttpServletResponse response)booleanprocessLogin(org.securityfilter.filter.SecurityRequestWrapper request, javax.servlet.http.HttpServletResponse response, XWikiContext context)voidshowLogin(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, XWikiContext context)static voidshowLogin(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String realmName)-
Methods inherited from class org.securityfilter.authenticator.BasicAuthenticator
bypassSecurityForThisRequest, getAuthMethod, init, processLogout, showLogin
-
-
-
-
Method Detail
-
processLogin
public boolean processLogin(org.securityfilter.filter.SecurityRequestWrapper request, javax.servlet.http.HttpServletResponse response) throws Exception- Specified by:
processLoginin interfaceorg.securityfilter.authenticator.Authenticator- Overrides:
processLoginin classorg.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:
processLoginin interfaceXWikiAuthenticator- 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:
processLoginin interfaceXWikiAuthenticator- 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:
showLoginin interfaceXWikiAuthenticator- Throws:
IOException
-
-