com.xpn.xwiki.user.impl.xwiki
Class AbstractXWikiAuthService

java.lang.Object
  extended by com.xpn.xwiki.user.impl.xwiki.AbstractXWikiAuthService
All Implemented Interfaces:
XWikiAuthService
Direct Known Subclasses:
XWikiAuthServiceImpl

public abstract class AbstractXWikiAuthService
extends Object
implements XWikiAuthService

Common methods useful to all Authentication services implementations.

Version:
$Id: 9159a62989c404c58f8953c4fffd7f7598d0afb5 $

Constructor Summary
AbstractXWikiAuthService()
           
 
Method Summary
protected  Principal authenticateSuperAdmin(String password, XWikiContext context)
           
protected  boolean isSuperAdmin(String username)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.xpn.xwiki.user.api.XWikiAuthService
authenticate, checkAuth, checkAuth, showLogin
 

Constructor Detail

AbstractXWikiAuthService

public AbstractXWikiAuthService()
Method Detail

isSuperAdmin

protected boolean isSuperAdmin(String username)
Parameters:
username - the username to check for superadmin access. Examples: "xwiki:XWiki.superadmin", "XWiki.superAdmin", "superadmin", etc
Returns:
true if the username is that of the superadmin (whatever the case) or false otherwise

authenticateSuperAdmin

protected Principal authenticateSuperAdmin(String password,
                                           XWikiContext context)
Parameters:
password - the superadmin password to check against the superadmin password located in XWiki's config file
context - the XWiki context object, allowing access to XWiki's config
Returns:
a null Principal is the user hasn't been validated as Superadmin or a Super Admin Principal otherwise


Copyright © 2004–2014 XWiki. All rights reserved.