当前位置:网站首页>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:49:00 【HUAWEI CLOUD】

作者:知识浅谈,CSDN签约讲师,华为云云享专家,Aliyun community star blogger
公众号:知识浅谈
擅长领域:全栈工程师、爬虫、ACM算法
联系方式vx:zsqtcc
前言:
- About authorized login contains three terminals,资源拥有者(用户),资源服务器(A website that stores user resources),第三方网站.
- OAuthIt is a layer used to separate users and third-party websites,After the user agrees,The resource server can be issued by a third-party websitetoken,Third-party sites through thistokenYou can access the information of the resource server corresponding to this user.
前提:不管哪种方式,All third-party websites need to register their identities with the resource server in advance,获取对应的appid和secret,为了防止tokenmisused.
- First, the third-party website carries itappid和secrect和redirect_urlGo to the resource server to get the login QR code
- After the user scans the code, the confirmation notification is sent to the resource server
- The resource server follows the first stepredirect_url返回authorization-codeand login success status
- 第三方获取authorization-codeThen bring your own registrationappid和secrect和authorization-codeGo to the resource server to get ittoken
- Then third-party websites are basedtokenAfter you go to the resource server to get the user information, you can wake up the follow-up operations.
The step of obtaining the authorization code is omitted,直接获取的token,Suitable for websites without a backend(不安全)
- carried by third-party websitesappid和secrect和redirect_urlGo to the resource server to get the login QR code
- After the user scans the code, the confirmation notification is sent to the resource server
- The resource server follows the first stepredirect_url返回tokenand login success status
- Then third-party websites are basedtokenGo to the resource server to obtain user information, and then follow-up operations can be performed
- carried by third-party websitesusername和passwordGet it from the resource servertoken
- Then third-party websites are basedtokenGo to the resource server to obtain user information, and then follow-up operations can be performed
适用于没有前端的命令行应用,即在命令行下请求令牌,这种tokenNot for users,即有可能多个用户共享同一个令牌.
- By carrying on the command lineappid和secrectto the resource servertoken
- Then the command line is based ontokenGo to the resource server to obtain user information, and then follow-up operations can be performed
Master the idea of these four authorized logins,It will be much simpler to do authorized login in the future.
边栏推荐
- STM32+ULN2003 drives 28BYJ4 stepper motor (forward and reverse according to the number of turns)
- Dynamics 365Online PDF导出及打印
- 使用Windbg过程中两个使用细节分享
- 第四章:activiti流程中,变量的传递和获取流程变量 ,设置和获取多个流程变量,设置和获取局部流程变量「建议收藏」
- The founder of the DFINITY Foundation talks about the ups and downs of the bear market, and where should DeFi projects go?
- SMB + SMB2: Accessing shares return an error after prolonged idle period
- SD NAND Flash简介!
- R语言使用yardstick包的pr_curve函数评估多分类(Multiclass)模型的性能、查看模型在多分类每个分类上的ROC曲线(precision(精准率),R代表的是recall(召回率)
- FPGA: Basic Getting Started LED Lights Blinking
- 【MindSpore Easy-Diantong Robot-01】You may have seen many knowledge quiz robots, but this one is a bit different
猜你喜欢

【加密解密】明文加密解密-已实现【已应用】

HDD杭州站•ArkUI让开发更灵活

Voice-based social software development - making the most of its value

我们的Web3创业项目,黄了

This notebook of concurrent programming knowledge points strongly recommended by Ali will be a breakthrough for you to get an offer from a big factory

数据可视化(一)

Opencv算术操作

MySQL transactions

MySQL事务

气象数据数据处理实例——matlab字符串切割匹配与R语言日期匹配(数据拼接)
随机推荐
FPGA:开发环境Vivado的使用
LeetCode 216. Combined Sum III (2022.08.04)
2022杭电多校 第6场 1008.Shinobu Loves Segment Tree 规律题
A small test of basic grammar, Go lang1.18 introductory refining tutorial, from Bai Ding to Hongru, basic grammar of go lang and the use of variables EP02
What are the standards for electrical engineering
深入理解 Istio 流量管理的超时时间设置
一文道清什么是SPL
2022杭电杯超级联赛(5)
Meteorological data processing example - matlab string cutting matching and R language date matching (data splicing)
How can project cost control help project success?
Still looking for a network backup resources?Hurry up to collect the following network backup resource search artifact it is worth collecting!
Opencv图像缩放和平移
The century-old Nordic luxury home appliance brand ASKO smart wine cabinet in the three-temperature area presents the Chinese Valentine’s Day, and tastes the love of the delicacy
攻防世界-PWN-new_easypwn
Dynamics 365Online PDF导出及打印
上位机开发C#语言:模拟STC串口助手接收单片机发送数据
单片机:温度控制DS18B20
Score interview (1)----related to business
如何选币与确定对应策略研究
如何测试一下现场的备机失败,转发主机的场景?