OAuth2.0 code demo

1. Download address

link: link

After pulling, get the following folder (put it in a non-Chinese directory)insert image description here

2. Project introduction

First open the developer tools, then open thepom.xmlfile
insert image description here
and modifyMavenaddress
insert image description here
insert image description here
insert image description here

3. Project operation process

The author made many breakpoints in the project, which can be very convenient for the demonstration process
Here the blogger uses text to describe the occurrence of the scene change

1.资源所有者
	资源所有者接到客户请求,需要返回授权码
2.客户 
	编写一个controller,向资源所有者请求发送请求来获取授权码
3.客户
	资源所有者生成授权码后,需要回调客户的一个接口,将授权码传回, 客户得到授权码后,需要向认证
	服务器发出请求,申请令牌
4.认证服务器
	认证服务器接到客户请求,生成令牌,并返回令牌数据
5.  客户
	客户获取了令牌,并使用令牌向资源服务器请求数据
6. 资源服务器
	资源服务器接到请求,返回数据

Guess you like

Origin blog.csdn.net/qq_63531917/article/details/128829148