Class ProfileRememberMeServices

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.MessageSourceAware, org.springframework.security.web.authentication.logout.LogoutHandler, org.springframework.security.web.authentication.RememberMeServices

    public class ProfileRememberMeServices
    extends org.springframework.security.web.authentication.rememberme.AbstractRememberMeServices
    Implementation of AbstractRememberMeServices for Profile
    Since:
    3.1.5
    Author:
    joseross
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.craftercms.profile.api.services.AuthenticationService authenticationService  
      • Fields inherited from class org.springframework.security.web.authentication.rememberme.AbstractRememberMeServices

        DEFAULT_PARAMETER, logger, messages, SPRING_SECURITY_REMEMBER_ME_COOKIE_KEY, TWO_WEEKS_S
    • Constructor Summary

      Constructors 
      Constructor Description
      ProfileRememberMeServices​(String key, org.springframework.security.core.userdetails.UserDetailsService userDetailsService, org.craftercms.profile.api.services.AuthenticationService authenticationService)  
    • 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, org.springframework.security.core.Authentication authentication)  
      protected void onLoginSuccess​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.security.core.Authentication successfulAuthentication)  
      protected org.springframework.security.core.userdetails.UserDetails processAutoLoginCookie​(String[] cookieTokens, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      • Methods inherited from class org.springframework.security.web.authentication.rememberme.AbstractRememberMeServices

        afterPropertiesSet, autoLogin, cancelCookie, createSuccessfulAuthentication, decodeCookie, encodeCookie, extractRememberMeCookie, getAuthenticationDetailsSource, getCookieName, getKey, getParameter, getTokenValiditySeconds, getUserDetailsService, loginFail, loginSuccess, onLoginFail, rememberMeRequested, setAlwaysRemember, setAuthenticationDetailsSource, setAuthoritiesMapper, setCookie, setCookieDomain, setCookieName, setMessageSource, setParameter, setTokenValiditySeconds, setUserDetailsChecker, setUseSecureCookie
    • Field Detail

      • authenticationService

        protected org.craftercms.profile.api.services.AuthenticationService authenticationService
    • Constructor Detail

      • ProfileRememberMeServices

        @ConstructorProperties({"key","userDetailsService","authenticationService"})
        public ProfileRememberMeServices​(String key,
                                         org.springframework.security.core.userdetails.UserDetailsService userDetailsService,
                                         org.craftercms.profile.api.services.AuthenticationService authenticationService)
    • Method Detail

      • onLoginSuccess

        protected void onLoginSuccess​(javax.servlet.http.HttpServletRequest request,
                                      javax.servlet.http.HttpServletResponse response,
                                      org.springframework.security.core.Authentication successfulAuthentication)
        Specified by:
        onLoginSuccess in class org.springframework.security.web.authentication.rememberme.AbstractRememberMeServices
      • logout

        public void logout​(javax.servlet.http.HttpServletRequest request,
                           javax.servlet.http.HttpServletResponse response,
                           org.springframework.security.core.Authentication authentication)
        Specified by:
        logout in interface org.springframework.security.web.authentication.logout.LogoutHandler
        Overrides:
        logout in class org.springframework.security.web.authentication.rememberme.AbstractRememberMeServices
      • processAutoLoginCookie

        protected org.springframework.security.core.userdetails.UserDetails processAutoLoginCookie​(String[] cookieTokens,
                                                                                                   javax.servlet.http.HttpServletRequest request,
                                                                                                   javax.servlet.http.HttpServletResponse response)
                                                                                            throws org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationException,
                                                                                                   org.springframework.security.core.userdetails.UsernameNotFoundException
        Specified by:
        processAutoLoginCookie in class org.springframework.security.web.authentication.rememberme.AbstractRememberMeServices
        Throws:
        org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationException
        org.springframework.security.core.userdetails.UsernameNotFoundException