3

OAuth 2 详解(四):Client Credentials Flow

 1 year ago
source link: https://jiajunhuang.com/articles/2022_10_10-oauth2_explained_client_credentials.md.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

OAuth 2 详解(四):Client Credentials Flow

这种模式,是另外一种简单的授权模式,甚至连用户名密码都不需要,直接根据 client_id, client_secret 就可以授权。

Client Credentials Flow
  1. 应用携带 client_id, client_secret 请求 Authorization Server
  2. Authorization Server 校验 client_id, client_secret
  3. Authorization Server 下发 access_token,以及 expires_in
  4. App带着access token请求接口
  5. 接口确认access token有效,返回对应数据

简单吧,这种模式适合什么情况呢?越简单的授权模式,要求对双方的信任度越高。这种模式,通常被用于M2M授权,M2M就是 Machine to Machine,比如 cli 请求服务器,服务间调用,这种模式更适合用于机器之间的授权,而不适用于用户。


微信公众号
关注公众号,获得及时更新

给Linux用户的FreeBSD快速指南 旧电脑也不能闲着:家用备份方案 将SQLite的数据迁移到MySQL Linux托管Windows虚拟机最佳实践 为什么gRPC难以推广 关于ORM的思考 MySQL指定使用索引(使用索引提示) QT5使用GTK主题 搭建samba服务器 ssh时自动运行tmux ufw简明教程 zerotier简明教程 提取kindle笔记 一个Golang gRPC握手错误的坑 Golang(Go语言)爬虫框架colly简明教程及源码阅读与分析



About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK