How to verify the app when doing PHP app interface
Reply content:
How to verify the app when doing PHP app interface
1. When the login verification is passed, the server generates a token token, which contains information such as user identity and expiration time, and then returns to the front end, in the presence of a cookie;
2. After the app side requests the data interface, the token band, the service side decoding authentication, pass is allowed to call.
JWT Specific implementation scenarios:
http://blog.leapoahead.com/2015/09/07/user-authentication-with-jwt/
http://blog.leapoahead.com/2015/09/06/understanding-jwt/
Of course, this implementation is like the first floor, or there is the possibility of being simulated submitted, but it is relatively safe, the higher may need to encrypt App,https to prevent the capture of packets, etc.
You can verify the app by setting the specified UA, parameter signature encryption, and so on. However, these are not completely reliable, because the app is open to the public, in principle, there is the possibility of anti-compilation, can be said to have been simulated by the possibility of submission.
Public key private key: Signing public key authentication with private key