java - Problems with spring-security and WeChat login?
習慣沉默
習慣沉默 2017-05-17 09:59:46
0
1
719

There is a need to create a WeChat public account, which requires WeChat login. After the front-end gives me the code, I apply for an access token and get the user's information.
Does this mean that the user model does not require a password? If spring security is not used, I need to control permissions on some API interfaces. How do I judge the permissions requested by the front end?
It is said on the Internet that tokens are used. Every request on the front end carries the token. Is this token the access token that WeChat gave me?

習慣沉默
習慣沉默

reply all(1)
小葫芦

Yes, similar to secretless login, you get the access_token from WeChat through code, and then get the user's information. If the user exists on the server, call spring security to generate the authenticated user object yourself, and return it to the client.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!