Class 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: 336c0f8e256582abc02e3c2cc4b92c1d926df2bf $
    • 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