Quantcast
Channel: Active questions tagged redis+java - Stack Overflow
Viewing all articles
Browse latest Browse all 2204

how to design a nice key-value in redis+jwt?

$
0
0

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:

  1. 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;
  2. 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,


Viewing all articles
Browse latest Browse all 2204

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>