How does Java use token for authentication?

< H1 > main requirements < / H1 > < H2 > Front end: < / H2 >
  1. token can be obtained through username / password
  2. with token in headers, you can access the restricted API
< H2 > backend: < / H2 >
  1. you can create a token with expiration time
  2. you can verify whether token is valid or expired
  3. can invalidate the specified token

read Jwt , but it seems that you can"t take the initiative to invalidate token .

Apr.11,2021

redis or put a table in the database, store the mapping of token and uid .

active invalidation means directly emptying the uid corresponding token .

each time, check whether uid has a corresponding token , and check it as you wish. Refresh is to generate a new token overlay.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3792f-40630.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3792f-40630.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?