当前位置:网站首页>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
边栏推荐
- How can project cost control help project success?
- 数据中台建设(十):数据安全管理
- NowCoderTOP35-40 - continuous update ing
- 告白数字化转型时代:麦聪软件以最简单的方式让企业把数据用起来
- Wei Dongshan Digital Photo Frame Project Learning (6) Transplantation of tslib
- E-sports, convenience, efficiency, security, key words for OriginOS functions
- The founder of the DFINITY Foundation talks about the ups and downs of the bear market, and where should DeFi projects go?
- leetcode: 529. 扫雷游戏
- STM32+ULN2003 drives 28BYJ4 stepper motor (forward and reverse according to the number of turns)
- MySQL data view
猜你喜欢
阿里顶级架构师多年总结的JVM宝典,哪里不会查哪里!
NowCoderTOP35-40——持续更新ing
C语言的高级用法
MySQL transactions
Still looking for a network backup resources?Hurry up to collect the following network backup resource search artifact it is worth collecting!
IDEA performs the Test operation, resulting in duplicate data when data is inserted
还在找网盘资源吗?快点收藏如下几个值得收藏的网盘资源搜索神器吧!
Huawei's lightweight neural network architecture GhostNet has been upgraded again, and G-GhostNet (IJCV22) has shown its talents on the GPU
Keil升级到AC6后,到底有哪些变化?
Advanced usage of C language
随机推荐
Our Web3 Entrepreneurship Project, Yellow
仿SBUS与串口数据固定转换
LeetCode 216. Combined Sum III (2022.08.04)
多线程(进阶) - 2.5w字总结
SMB + SMB2: Accessing shares return an error after prolonged idle period
Wei Dongshan Digital Photo Frame Project Learning (6) Transplantation of tslib
浅析WSGI协议
【温度预警程序de开发】事件驱动模型实例运用
【 temperature warning program DE development 】 event driven model instance
IDEA performs the Test operation, resulting in duplicate data when data is inserted
一个栈的输入序列为1 2 3 4 5 的出站顺序的理解
Oracle 19.3 restart 环境
公众号如何运维?公众号运维专业团队
Imitation SBUS fixed with serial data conversion
FPGA:基础入门按键控制LED灯
2022 Huashu Cup Mathematical Modeling Question A Optimization Design Ideas for Ring Oscillators Code Sharing
egg框架使用(二)
Advanced usage of C language
我们的Web3创业项目,黄了
蚁剑webshell动态加密连接分析与实践