• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
返回主页

dkn

  • 博客园
  • 首页
  • 新随笔
  • 联系
  • 订阅
  • 管理

oauth2的四种模式和刷新令牌的请求地址及参数

1.1获取code码
http://127.0.0.1:9091/oauth/authorize?response_type=code&client_id=client1
1.2用code模式获取token
http://127.0.0.1:9091/oauth/token?client_id=client1&client_secret=123&grant_type=authorization_code&code=MnPDgC

2.简化授权码模式
http://localhost:8080/oauth/authorize?response_type=token&client_id=banana&redirect_uri=http://baidu.com
http://127.0.0.1:9091/oauth/authorize?response_type=token&client_id=client1

3.password模式获取token
http://127.0.0.1:9091/oauth/token?client_id=client1&client_secret=123&grant_type=password&username=admin&password=123

4.客户端模式获取token
http://127.0.0.1:9091/oauth/token?grant_type=client_credentials

5.通过刷新令牌获取token
http://127.0.0.1:9091/oauth/token?client_id=client1&client_secret=123&grant_type=refresh_token&refresh_token=16a423f7-210d-432d-967e-827ff5f54554

posted @ 2021-02-02 03:00  dkn  阅读(2328)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3