OAuth 2 详解(四):Client Credentials Flow
这种模式,是另外一种简单的授权模式,甚至连用户名密码都不需要,直接根据 client_id, client_secret 就可以授权。

步骤:
- 应用携带
client_id,client_secret请求Authorization Server Authorization Server校验client_id,client_secretAuthorization Server下发access_token,以及expires_in等- App带着access token请求接口
- 接口确认access token有效,返回对应数据
简单吧,这种模式适合什么情况呢?越简单的授权模式,要求对双方的信任度越高。这种模式,通常被用于M2M授权,M2M就是 Machine to Machine,比如 cli 请求服务器,服务间调用,这种模式更适合用于机器之间的授权,而不适用于用户。
ref:
邮件 订阅
RSS 订阅
Web开发简介系列
数据结构的实际使用
Golang 简明教程
Python 教程