Joke Collection Website - Blessing messages - How to use the authorized source code

How to use the authorized source code

The authorized source code first adds a permission value to the current client, then obtains the token and accesses the resource server.

As can be seen from the code, the authority of Oauth2 corresponds to the role code value in Security. You can control authorization by configuring the role of the Oauth2 client and then using the clientHasAnyRole expression. Support to add domain name authorization to your own template or the whole site source code, and support online query whether it is genuine authorization.

Literally means authorization. We have analyzed before that authorization can be made through resourceId and scope. Through the above analysis, the original permissions, like scopes, are all method-level permissions control. The difference is that scope can choose which permissions the authorized client has through the user himself, while authorities are dead.

relevant knowledge

Source authorization is a brand-new authorization system developed by ThinkPHP 5.0.

Built-in powerful functions, such as email management, Tencent Cloud SMS and Li Yun SMS, are powerful, concise and easy to use.