Without logging in, we can also directly access functions such as department management and employee management
Since the Http protocol is stateless, that is, each request is independent, the next request will not carry the previous data, and the server cannot determine whether it has been logged in.
login verification
How to implement login verification
After the employee logs in successfully, the server stores a login token , and then performs a conditional judgment before each functional interface to determine whether the login is successful. But this will be a bit too cumbersome, so all requests can be intercepted uniformly .
login token
After the user logs in successfully, the token can be obtained in each request