Class MyBasicAuthenticator

  • All Implemented Interfaces:
    XWikiAuthenticator, org.securityfilter.authenticator.Authenticator

    public class MyBasicAuthenticator
    extends org.securityfilter.authenticator.BasicAuthenticator
    implements XWikiAuthenticator
    • Field Summary

      • Fields inherited from class org.securityfilter.authenticator.BasicAuthenticator

        LOGIN_ATTEMPTS, LOGIN_FAILED_MESSAGE, MAX_ATTEMPTS, realm, realmName
    • Constructor Detail

      • MyBasicAuthenticator

        public MyBasicAuthenticator()
    • Method Detail

      • processLogin

        public boolean processLogin​(org.securityfilter.filter.SecurityRequestWrapper request,
                                    javax.servlet.http.HttpServletResponse response)
                             throws Exception
        Specified by:
        processLogin in interface org.securityfilter.authenticator.Authenticator
        Overrides:
        processLogin in class org.securityfilter.authenticator.BasicAuthenticator
        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
      • showLogin

        public static void showLogin​(javax.servlet.http.HttpServletRequest request,
                                     javax.servlet.http.HttpServletResponse response,
                                     String realmName)
                              throws IOException
        Throws:
        IOException