405 AWS Cognito OAuth2/Token终结点中的方法不允许错误 [英] 405 method not allowed error in AWS Cognito oauth2/token endpoint
本文介绍了405 AWS Cognito OAuth2/Token终结点中的方法不允许错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用AWS Cognito UI进行登录,使用授权码授予流并成功获取授权码。但是当通过邮递员向OAuth2/Token终结点发出POST请求时,出现405方法不允许错误
应用程序客户端设置在Cognito用户池中,应用程序机密以Base64编码传递appclientid:appclientret作为授权。
推荐答案
如文档所述:
内容类型 必须始终为‘应用程序/x-www-form-urlencode’。
来源:https://docs.aws.amazon.com/cognito/latest/developerguide/token-endpoint.html
这篇关于405 AWS Cognito OAuth2/Token终结点中的方法不允许错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文