Class MyFormAuthenticator

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

    public class MyFormAuthenticator
    extends org.securityfilter.authenticator.FormAuthenticator
    implements XWikiAuthenticator
    • Field Summary

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

        DEFAULT_LOGIN_SUBMIT_PATTERN, defaultPage, errorPage, errorPagePattern, FORM_PASSWORD, FORM_REMEMBERME, FORM_USERNAME, LOGIN_SUBMIT_PATTERN_KEY, loginPage, loginPagePattern, loginSubmitPattern, logoutPagePattern, persistentLoginManager, realm
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static Principal authenticate​(String username, String password, XWikiContext context)  
      boolean processLogin​(String username, String password, String rememberme, org.securityfilter.filter.SecurityRequestWrapper request, javax.servlet.http.HttpServletResponse response, XWikiContext context)
      Process any login information passed in parameter (username, password).
      boolean processLogin​(org.securityfilter.filter.SecurityRequestWrapper request, javax.servlet.http.HttpServletResponse response)  
      boolean processLogin​(org.securityfilter.filter.SecurityRequestWrapper request, javax.servlet.http.HttpServletResponse response, XWikiContext context)
      Process any login information that was included in the request, if any.
      boolean processLogout​(org.securityfilter.filter.SecurityRequestWrapper securityRequestWrapper, javax.servlet.http.HttpServletResponse httpServletResponse, org.securityfilter.filter.URLPatternMatcher urlPatternMatcher)  
      void showLogin​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      void showLogin​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, XWikiContext context)
      Show the login page.
      • Methods inherited from class org.securityfilter.authenticator.FormAuthenticator

        bypassSecurityForThisRequest, getAuthMethod, init
      • Methods inherited from interface org.securityfilter.authenticator.Authenticator

        bypassSecurityForThisRequest, getAuthMethod, init
    • Constructor Detail

      • MyFormAuthenticator

        public MyFormAuthenticator()
    • Method Detail

      • showLogin

        public void showLogin​(javax.servlet.http.HttpServletRequest request,
                              javax.servlet.http.HttpServletResponse response,
                              XWikiContext context)
                       throws IOException
        Show the login page.
        Specified by:
        showLogin in interface XWikiAuthenticator
        Parameters:
        request - the current request
        response - the current response
        Throws:
        IOException
      • showLogin

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

        public boolean processLogin​(org.securityfilter.filter.SecurityRequestWrapper request,
                                    javax.servlet.http.HttpServletResponse response,
                                    XWikiContext context)
                             throws Exception
        Process any login information that was included in the request, if any. Returns true if SecurityFilter should abort further processing after the method completes (for example, if a redirect was sent as part of the login processing).
        Specified by:
        processLogin in interface XWikiAuthenticator
        Parameters:
        request -
        response -
        Returns:
        true if the filter should return after this method ends, false otherwise
        Throws:
        Exception
      • processLogin

        public boolean processLogin​(String username,
                                    String password,
                                    String rememberme,
                                    org.securityfilter.filter.SecurityRequestWrapper request,
                                    javax.servlet.http.HttpServletResponse response,
                                    XWikiContext context)
                             throws Exception
        Process any login information passed in parameter (username, password). Returns true if SecurityFilter should abort further processing after the method completes (for example, if a redirect was sent as part of the login processing).
        Specified by:
        processLogin in interface XWikiAuthenticator
        Parameters:
        request -
        response -
        Returns:
        true if the filter should return after this method ends, false otherwise
        Throws:
        Exception
      • processLogout

        public boolean processLogout​(org.securityfilter.filter.SecurityRequestWrapper securityRequestWrapper,
                                     javax.servlet.http.HttpServletResponse httpServletResponse,
                                     org.securityfilter.filter.URLPatternMatcher urlPatternMatcher)
                              throws Exception
        Specified by:
        processLogout in interface org.securityfilter.authenticator.Authenticator
        Overrides:
        processLogout in class org.securityfilter.authenticator.FormAuthenticator
        Throws:
        Exception