【发布时间】:2020-06-18 08:26:05
【问题描述】:
如何通过用户名和密码从 aws cognito oauth2/token 端点单步获取 jwt 令牌(api 调用)
curl --location --request POST 'https://xxx.auth.us-east-2.amazoncognito.com/oauth2/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic a......k' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_id=t34...nu'
--授权base64ecoded username:password
Response- "error": "invalid_client"
应用客户端设置:
Allowed OAuth Flows : Authorization code grant, Implicit Grant
Allowed OAuth scope : email , openid
App clients : ALLOW_USER_PASSWORD_AUTH
我也尝试了 oauth2/authorize,但得到了 html 页面作为响应
【问题讨论】:
标签: amazon-cognito