无法使用Cognito获取客户端凭据流的令牌

0

【以下的问题经过翻译处理】 我想使用 Cognito 通过客户端凭据进行服务器到服务器的身份验证。 我创建并配置了一个用户池和一个客户端应用程序。 带有客户端 ID 和秘密。 当我使用postman发布到 https://{myapp}.auth.us-west-2.amazoncognito.com/oauth2/token 时,我总是收到 405 错误。 我按照在线示例的指示进行操作,但似乎不起作用。

profile picture
EXPERTO
preguntada hace 6 meses13 visualizaciones
1 Respuesta
0

【以下的回答经过翻译处理】 嗨,

POST 方法和 /oauth2/token 路径似乎都没问题。您能确认您发送了带有值为 application/x-www-form-urlencodedContent-Type 头部吗?根据 [AWS 文档]https://docs.aws.amazon.com/cognito/latest/developerguide/token-endpoint.html#post-token,此头部是强制要求的,必须包含指定的值。

profile picture
EXPERTO
respondido hace 6 meses

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas