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 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(String username, String password, String rememberme, org.securityfilter.filter.SecurityRequestWrapper request, javax.servlet.http.HttpServletResponse response, XWikiContext context)
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)
void
showLogin(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, XWikiContext context)
static void
showLogin(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:
processLogin
in interfaceorg.securityfilter.authenticator.Authenticator
- Overrides:
processLogin
in 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:
processLogin
in 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:
processLogin
in 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:
showLogin
in interfaceXWikiAuthenticator
- Throws:
IOException
-
-