in project,i used jwt+redis to implements user's auth,but how to design the k-v that I get in trouble. I think:
- when user login, jwt return the token to user, redis put token as key, user info as value at the same time with expire time;
- user request the server with token;server verify the token in redis, if it has the key-value, so ture,else false and return the noauth message or token expires;in the whole process, i dont't verify the token in using jwt, redis is used instead.
but jwttoken is too long as key , i think it isn't a good case. what should I do
design a good k-v in jwttoken,