com.xpn.xwiki.user.impl.xwiki
Class XWikiAuthServiceImpl
java.lang.Object
com.xpn.xwiki.user.impl.xwiki.AbstractXWikiAuthService
com.xpn.xwiki.user.impl.xwiki.XWikiAuthServiceImpl
- All Implemented Interfaces:
- XWikiAuthService
- Direct Known Subclasses:
- AppServerTrustedAuthServiceImpl, ExoAuthServiceImpl, GroovyAuthServiceImpl, LDAPAuthServiceImpl, XWikiLDAPAuthServiceImpl
public class XWikiAuthServiceImpl
- extends AbstractXWikiAuthService
|
Method Summary |
java.security.Principal |
authenticate(java.lang.String username,
java.lang.String password,
XWikiContext context)
|
XWikiUser |
checkAuth(java.lang.String username,
java.lang.String password,
java.lang.String rememberme,
XWikiContext context)
Method to authenticate and set the cookie from a username and password passed as parameters |
XWikiUser |
checkAuth(XWikiContext context)
|
protected boolean |
checkPassword(java.lang.String username,
java.lang.String password,
XWikiContext context)
|
protected void |
createUser(java.lang.String user,
XWikiContext context)
|
protected java.lang.String |
findUser(java.lang.String username,
XWikiContext context)
|
protected XWikiAuthenticator |
getAuthenticator(XWikiContext context)
|
protected java.lang.String |
getParam(java.lang.String name,
XWikiContext context)
|
void |
showLogin(XWikiContext context)
|
protected java.lang.String |
stripContextPathFromURL(java.net.URL url,
XWikiContext context)
The authentication library we are using (SecurityFilter) requires that its URLs do not contain the context path,
in order to be usable with RequestDispatcher.forward. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
authenticator
protected XWikiAuthenticator authenticator
XWikiAuthServiceImpl
public XWikiAuthServiceImpl()
getAuthenticator
protected XWikiAuthenticator getAuthenticator(XWikiContext context)
throws XWikiException
- Throws:
XWikiException
checkAuth
public XWikiUser checkAuth(XWikiContext context)
throws XWikiException
- Throws:
XWikiException
checkAuth
public XWikiUser checkAuth(java.lang.String username,
java.lang.String password,
java.lang.String rememberme,
XWikiContext context)
throws XWikiException
- Method to authenticate and set the cookie from a username and password passed as parameters
- Parameters:
username - the user name for the user to authenticatepassword - the password of the user to authenticatecontext - the XWiki context object
- Returns:
- null if the user is not authenticated properly
- Throws:
XWikiException - in case of authentication error
showLogin
public void showLogin(XWikiContext context)
throws XWikiException
- Throws:
XWikiException
authenticate
public java.security.Principal authenticate(java.lang.String username,
java.lang.String password,
XWikiContext context)
throws XWikiException
-
- Returns:
- a null Principal Object if the user hasn't been authenticated or a valid Principal
Object if the user is correctly authenticated
- Throws:
XWikiException- See Also:
XWikiAuthService.authenticate(String,String,XWikiContext)
findUser
protected java.lang.String findUser(java.lang.String username,
XWikiContext context)
throws XWikiException
- Throws:
XWikiException
checkPassword
protected boolean checkPassword(java.lang.String username,
java.lang.String password,
XWikiContext context)
throws XWikiException
- Throws:
XWikiException
getParam
protected java.lang.String getParam(java.lang.String name,
XWikiContext context)
createUser
protected void createUser(java.lang.String user,
XWikiContext context)
throws XWikiException
- Throws:
XWikiException
stripContextPathFromURL
protected java.lang.String stripContextPathFromURL(java.net.URL url,
XWikiContext context)
- The authentication library we are using (SecurityFilter) requires that its URLs do not contain the context path,
in order to be usable with RequestDispatcher.forward. Since our URL factory include the context path in
the generated URLs, we use this method to remove (if needed) the context path.
- Parameters:
url - The URL to process.context - The ubiquitous XWiki request context.
- Returns:
- A
String representation of the contextpath-free URL.
Copyright © 2004-2008 XWiki. All Rights Reserved.