Package org.xwiki.security.authservice
Class AbstractXWikiAuthServiceWrapper
- java.lang.Object
-
- org.xwiki.security.authservice.AbstractXWikiAuthServiceWrapper
-
- All Implemented Interfaces:
XWikiAuthService
@Unstable public abstract class AbstractXWikiAuthServiceWrapper extends Object implements XWikiAuthService
Helper to redirect allXWikiAuthService
calls to anotherXWikiAuthService
.- Since:
- 15.3RC1
- Version:
- $Id: f14bca3a492a70d90eb31f023696c7da66cdcc15 $
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractXWikiAuthServiceWrapper(XWikiAuthService service)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Principal
authenticate(String username, String password, XWikiContext context)
XWikiUser
checkAuth(XWikiContext context)
XWikiUser
checkAuth(String username, String password, String rememberme, XWikiContext context)
Authenticates the user.void
showLogin(XWikiContext context)
-
-
-
Constructor Detail
-
AbstractXWikiAuthServiceWrapper
protected AbstractXWikiAuthServiceWrapper(XWikiAuthService service)
-
-
Method Detail
-
checkAuth
public XWikiUser checkAuth(XWikiContext context) throws XWikiException
- Specified by:
checkAuth
in interfaceXWikiAuthService
- Throws:
XWikiException
-
checkAuth
public XWikiUser checkAuth(String username, String password, String rememberme, XWikiContext context) throws XWikiException
Description copied from interface:XWikiAuthService
Authenticates the user.- Specified by:
checkAuth
in interfaceXWikiAuthService
- 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 or a
XWikiUser
object representing the authenticated user if successful - Throws:
XWikiException
- in case of authentication error
-
showLogin
public void showLogin(XWikiContext context) throws XWikiException
- Specified by:
showLogin
in interfaceXWikiAuthService
- Throws:
XWikiException
-
authenticate
public Principal authenticate(String username, String password, XWikiContext context) throws XWikiException
- Specified by:
authenticate
in interfaceXWikiAuthService
- 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
-
-