Class RedisAuthService

    • Constructor Detail

      • RedisAuthService

        public RedisAuthService()
    • Method Detail

      • addAuthentication

        public void addAuthentication​(javax.servlet.http.HttpServletRequest request,
                                      javax.servlet.http.HttpServletResponse response,
                                      org.springframework.security.core.Authentication authentication)
        Description copied from interface: AuthService
        Add the authentication on the response after performs other operations like persistence server side
        Specified by:
        addAuthentication in interface AuthService
        Parameters:
        request - the http request
        response - the http response
        authentication - the authentication
      • getAuthentication

        public org.springframework.security.core.Authentication getAuthentication​(javax.servlet.http.HttpServletRequest request)
        Specified by:
        getAuthentication in interface AuthService
      • createTokenForUser

        public String createTokenForUser​(TokenUser user,
                                         String secret)
        creates a token without expiration expiration is to be validated against redis
        Specified by:
        createTokenForUser in interface AuthService
        Parameters:
        user - the user to create token for
        secret - the secret for signature
        Returns:
        jwt token