python - 使用 jwt 身份验证的蜂房
问题描述
我使用以下内容从 API 获取令牌:
# fetch the token
res = requests.post(url, data={"email": email, "password": password})
token_json = res.json()
# now can use the api
res = requests.post(authenticated_url, headers={
"Authorization": "Bearer %s" % token_json['access']
}
data = res.json()
我将如何在 Apiary 中进行设置?我见过的最接近使用身份验证的是:
解决方案
推荐阅读
- javascript - 将 html-webpack-plugin 和 favicons-webpack-plugin 与 craco 一起使用,但不适用于 index.html
- typescript - Typescript - 类型保护不缩小与泛型类型和函数的联合
- keycloak - 如何从 Keycloak 获取用于 HS512 的签名密钥?
- c# - Microsoft.Office.Interop.Excel.FormatConditions 可以包含 3 种以上的条件格式吗?
- python - 使用 tf.keras.preprocessing.image_dataset_from_directory 的 tf.data.Dataset 训练模型非常慢 keras
- html - 如何在 vscode 中格式化 django-html 代码
- python-3.x - Pyspark to_timestamp 与时区
- karate - 在 karate-core 中为可重用功能创建函数
- java - java.lang.IllegalArgumentException:非法值,当我尝试通过捆绑传递对象时
- java - 如何使用lombok为实体中嵌入类的成员变量分配默认值?