Class CookieClearingLogoutHandler

  • All Implemented Interfaces:
    LogoutHandler

    public final class CookieClearingLogoutHandler
    extends java.lang.Object
    implements LogoutHandler
    A logout handler which clears either - A defined list of cookie names, using the context path as the cookie path OR - A given list of Cookies
    Since:
    3.1
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void logout​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Authentication authentication)
      Causes a logout to be completed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CookieClearingLogoutHandler

        public CookieClearingLogoutHandler​(java.lang.String... cookiesToClear)
      • CookieClearingLogoutHandler

        public CookieClearingLogoutHandler​(javax.servlet.http.Cookie... cookiesToClear)
        Parameters:
        cookiesToClear - - One or more Cookie objects that must have maxAge of 0
        Since:
        5.2
    • Method Detail

      • logout

        public void logout​(javax.servlet.http.HttpServletRequest request,
                           javax.servlet.http.HttpServletResponse response,
                           Authentication authentication)
        Description copied from interface: LogoutHandler
        Causes a logout to be completed. The method must complete successfully.
        Specified by:
        logout in interface LogoutHandler
        Parameters:
        request - the HTTP request
        response - the HTTP response
        authentication - the current principal details