数据中台
接口安全
认证
通讯安全
规则执行
通用组件
通知器
标准化字段校验
定时器
HTTP调用
Rabbit消息发布
脚本可用JAVA库
【必读】上下文
本文档使用 MrDoc 发布
-
+
首页
认证
# 接口描述 * 使用OAuth2的客户端认证方式 * token有效期参考响应参数 `expires_in` * 后续接口使用需传递header `Authorization : <token_type> <access_token>` # 请求地址 POST /auth/oauth2/token # 请求参数 | 参数名 | 类型 | 必填 | 参数位置| 描述 | | --- | --- | --- | ---| --- | | grant_type |string|是|`form` |固定为`client_credentials`| |Authorization | base64 | 是 |header |需将client_id与client_secret用":"拼接进行base64编码 `Basic <toBase64(client_id:client_secret)>`| # 响应参数 | 参数名 | 类型 | 描述 | | --- | --- | --- | | access_token | string | 用于后续接口请求的token | | token_type | string | token类型,固定为Bearer | | expires_in | int | token有效期(秒) | # 请求示例 ```http POST /auth/oauth2/token # 请求头: Authorization: Basic <toBase64(client_id:client_secret)> # form参数: grant_type=client_credentials ``` # 响应示例 ```json { "access_token": "5c507e32-7e81-4a64-a3e6-09420b6c1396" , "token_type": "Bearer", "expires_in" : 7199 } ```
admin
2025年7月16日 13:58
转发文档
收藏文档
上一篇
下一篇
手机扫码
复制链接
手机扫一扫转发分享
复制链接
Markdown文件
PDF文档(打印)
分享
链接
类型
密码
更新密码