当前位置:网站首页>The fuse: OAuth 2.0 four authorized login methods must read
The fuse: OAuth 2.0 four authorized login methods must read
2022-08-05 10:17:00 【InfoQ】
- About authorized login includes three terminals, resource owner (user), resource server (website storing user resources), pageThird-party website.
- OAuth is a layer used to separate users and third-party websites. After the user agrees, the resource server can issue tokens to the third-party websites, and the firstThe third-party website can access the information of the resource server corresponding to the user through this token.
Four ways of OAuth2.0 authorization
Premise: No matter which way, the third-party website needs to register with the resource server in advanceIdentity, get the corresponding appid and secret, in order to prevent the token from being used indiscriminately.
authorization-code
- First, the third-party website carries the appid, secrect and redirect_url to the resource server to get the QR code for login
- Pass the confirmation notification to the resource server after the user scans the code
- The resource server returns according to the redirect_url in the first stepauthorization-codeand the login success status
- After the third party obtains the authorization-code, it will bring its own previously registered appid, secrect and authorization-code to the resource server to obtain the token
- Then the third-party website can go to the resource server to obtain the user information according to the token, and then it can wake up the follow-up operation.
Hidden (implicit)
- The third-party website carries the appid, secrect and redirect_url to the resource server to obtain the login QR code
- After the user scans the code, the confirmation notification is sent to the resource server
- The resource server follows the firstThe redirect_url of the step returnstokenand the successful login status
- and then the third-party website according to the tokenGo to the resource server to get the user information and you can do the follow-up operations
password
- ported by the third-party websiteUsername and password go to the resource server to get the token
- Then the third-party website can go to the resource server to obtain the user information according to the token, and then follow-up operations can be done
client credentials (client credentials)
- Get the token from the resource server by carrying the appid and secrect on the command line
- Then the command line goes to the resource server to obtain user information according to the token, and then the follow-up operations can be done
Summary
边栏推荐
猜你喜欢
【综合类型第 35 篇】程序员的七夕浪漫时刻
Qiu Jun, CEO of Eggplant Technology: Focus on users and make products that users really need
Which big guy has the 11G GI and ojvm patches in April or January 2020, please help?
mysql索引
Tanabata romantic date without overtime, RPA robot helps you get the job done
How can project cost control help project success?
Open Source Summer | How OpenHarmony Query Device Type (eTS)
Bias lock/light lock/heavy lock lock is healthier. How is locking and unlocking accomplished?
JS逆向入门学习之回收商网,手机号码简易加密解析
RT-Thread记录(一、RT-Thread 版本、RT-Thread Studio开发环境 及 配合CubeMX开发快速上手)
随机推荐
Four years of weight loss record
上位机开发C#语言:模拟STC串口助手接收单片机发送数据
Still looking for a network backup resources?Hurry up to collect the following network backup resource search artifact it is worth collecting!
What is CRM Decision Analysis Management?
Data Middle Office Construction (10): Data Security Management
【综合类型第 35 篇】程序员的七夕浪漫时刻
导火索:OAuth 2.0四种授权登录方式必读
ffmpeg drawtext 添加文本水印
[Unity] [UGUI] [Display text on the screen]
Pytorch Deep Learning Quick Start Tutorial -- Mound Tutorial Notes (3)
C语言的高级用法
【翻译】混沌网+SkyWalking:为混沌工程提供更好的可观察性
如何选币与确定对应策略研究
Technical dry goods | Hausdorff distance for image segmentation based on MindSpore
JS逆向入门学习之回收商网,手机号码简易加密解析
hcip BGP enhancement experiment
第九章:activit内置用户组设计与组任务分配和IdentityService接口的使用
Confessing in the era of digital transformation: Mai Cong Software allows enterprises to use data in the easiest way
皕杰报表的下拉框联动
egg框架使用(一)