当前位置:网站首页>Re understand oauth2.0 protocol for joint login
Re understand oauth2.0 protocol for joint login
2022-06-30 11:43:00 【Full stack programmer webmaster】
One 、 Define several name concepts :
- Authorization link : Jump to the authorization interface
- The function of the callback address : On the authorization page , Click to authorize ,( The authorization button is provided by a third party ), If the authorization succeeds , Will jump to the callback address , And the authorization code is passed to us as a parameter , And then get through the authorization code acctoken, Get more Openid.
- openid openid It is a unique and non repeated identification provided by the third-party open platform . Use Openid Combine your own website for joint login operation
Two 、oauth2.0 Agreement acquisition openid technological process
1. Generate an authorization code connection ,
2. Click to authorize ( Jump to the callback address , The authorization code is in the parameter ) Exchange for by authorization code acctoken
3. adopt acctoken Exchange for openid
4. adopt acctoken+openid In exchange for user information .3、 ... and 、 The overall process of authorization login of associated account
- Jump authorization connection
- Authorized success , Jump to callback address , The parameters carried include authorization code , Exchange for by authorization code acctoken,acctoken Exchange for openid
- Use openid Query our database , If yes, it indicates that the account number has been associated before , Release login
- If you use openid I didn't find , Jump to the associated account page .
- The associated page is divided into associated pages : (1) A new account is equivalent to registering , At the same time, we should also put openId Write data ). You need to associate the account number with openid Write to the database . (2) Associate the original account , Log in first , In the Openid Write to the database .
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/100802.html Link to the original text :https://javaforall.cn
边栏推荐
猜你喜欢
![Speech recognition - Fundamentals (I): introduction [speech to text]](/img/28/eb45bf27fffaa29108de84aa72a335.png)
Speech recognition - Fundamentals (I): introduction [speech to text]

微信表情符号被写入判决书,你发的每个 emoji 都可能成为呈堂证供

基于视觉的机器人抓取:从物体定位、物体姿态估计到平行抓取器抓取估计

Discussion on the essence of "FPGA mining" from open source projects

"New digital technology" completed tens of millions of yuan of a + round financing and built an integrated intelligent database cloud management platform

"War" caused by a bottle of water

数学(快速幂)

Pointdistiller: structured knowledge distillation for efficient and compact 3D detection

Win10 R package installation error: not installed in arch=i386

Boost研究:Boost Log
随机推荐
Database connection pool Druid
R language de duplication operation unique duplicate filter
以PolarDB为代表的阿里云数据库以跻身全球第一阵营
Livedata source code appreciation III - frequently asked questions
Oracle NetSuite 助力 TCM Bio,洞悉数据变化,让业务发展更灵活
[IC5000 tutorial] - 01- use daqdea graphical debug to debug C code
Object mapping - mapping Mapster
8 lines of code to achieve quick sorting, easy to understand illustrations!
Train an image classifier demo in pytorch [learning notes]
线代(高斯消元法、线性基)
TypeScript ReadonlyArray(只读数组类型) 详细介绍
Use of switch statement in go language learning
Esp32-c3 introductory tutorial IOT part ⑤ - Alibaba cloud Internet of things platform espaliyun RGB LED practical mass production solution
Webview,ScrollView滑动冲突咋整
Set up your own website (13)
Xu Lei expressed three thanks for the most difficult 618 in 19 years
脚本中如何'优雅'避免MySQL登录提示信息
wallys/IPQ8074a/2x(4×4 or 8×8) 11AX MU-MIMO DUAL CONCURRENT EMBEDDEDBOARD
[applet practice series] Introduction to the registration life cycle of the applet framework page
[xi'anjiaotonguniversity] information sharing of the first and second postgraduate entrance examinations