Class RememberMe


  • public class RememberMe
    extends Object
    Author:
    Kir
    • Method Detail

      • createUserCookie

        @NotNull
        public javax.servlet.http.Cookie createUserCookie​(@NotNull
                                                          User user,
                                                          @NotNull
                                                          javax.servlet.http.HttpServletRequest request)
      • getUpdatedUserCookie

        @Nullable
        public javax.servlet.http.Cookie getUpdatedUserCookie​(@Nullable
                                                              User user,
                                                              @NotNull
                                                              javax.servlet.http.HttpServletRequest request)
        Returns user cookie with the updated timestamp and, possibly, value. If specified user or cookie was not found, returns null.
        Parameters:
        user - logged in user
      • getUser

        @Nullable
        public SUser getUser​(@NotNull
                             javax.servlet.http.HttpServletRequest request)
      • forgetUserAndGetResponseCookie

        @NotNull
        public javax.servlet.http.Cookie forgetUserAndGetResponseCookie​(@NotNull
                                                                        javax.servlet.http.HttpServletRequest request)
      • deleteAllForUser

        public void deleteAllForUser​(long userId)
      • deleteAll

        public void deleteAll()