当前位置:网站首页>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.
边栏推荐
- 数据可视化(一)
- 【MySQL基础】-【数据处理之增删改】
- sqlserver编写通用脚本实现获取一年前日期的方法
- Chapter 4: In the activiti process, variable transmission and acquisition process variables, setting and acquiring multiple process variables, setting and acquiring local process variables "recommende
- Use KUSTO query statement (KQL) to query LOG on Azure Data Explorer Database
- js hijacks the array push method
- 《分布式云最佳实践》分论坛,8 月 11 日深圳见
- DocuWare平台——文档管理的内容服务和工作流自动化的平台详细介绍(下)
- gradle尚硅谷笔记
- 电气工程的标准是什么
猜你喜欢

PCB layout must know: teach you to correctly lay out the circuit board of the op amp

High-quality DeFi application building guide to help developers enjoy DeFi Summer

MySQL 中 auto_increment 自动插入主键值

【深度学习】mmclassification mmcls 实战多标签分类任务教程,分类任务

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

012_SSS_ Improving Diffusion Model Efficiency Through Patching

反射修改jsessionid实现Session共享

一文道清什么是SPL

012年通过修补_sss_提高扩散模型效率

用KUSTO查询语句(KQL)在Azure Data Explorer Database上查询LOG实战
随机推荐
数分面试(一)----与业务相关
第五章:多线程通信—wait和notify
Confessing in the era of digital transformation: Mai Cong Software allows enterprises to use data in the easiest way
PCB布局必知必会:教你正确地布设运算放大器的电路板
Getting started with Polkadot parachain development, this article is enough
MySQL 中 auto_increment 自动插入主键值
60行从零开始自己动手写FutureTask是什么体验?
使用Windbg过程中两个使用细节分享
SMB + SMB2: Accessing shares return an error after prolonged idle period
The founder of the DFINITY Foundation talks about the ups and downs of the bear market, and where should DeFi projects go?
解决【命令行/终端】颜色输出问题
【综合类型第 35 篇】程序员的七夕浪漫时刻
登录功能和退出功能(瑞吉外卖)
第四章:redis 数组结构的set和一些通用命令「建议收藏」
数据可视化(二)
华为分析&联运活动,助您提升游戏总体付费
2022技能大赛训练题:交换机snmp配置
Latex如何控制表格的宽度和高度
FPGA:基础入门LED灯闪烁
R语言使用yardstick包的pr_curve函数评估多分类(Multiclass)模型的性能、查看模型在多分类每个分类上的ROC曲线(precision(精准率),R代表的是recall(召回率)