spring - 带有 UAA 服务器的 OAuth 客户端 webapp - error="access_denied", error_description="Error requesting access token."
问题描述
我正在从这个https://github.com/cfid/uaa-samples/tree/master/basic-java-client运行 OAuth 客户端 当我尝试访问该应用程序时,它会将我重定向到 UAA 登录页面。输入凭据后,出现以下错误:
error="access_denied", error_description="请求访问令牌时出错。"
查看我的客户端 webapp 上的日志,我看到以下内容:
-- AuthorizationCodeAccessTokenProvider:编码和发送形式:{grant_type= [authorization_code], code=[S9uXYsvgn4], redirect_uri=[ http://localhost:8081/sampleapp/login] } [2018-07-29 15:23:38.759]样本/应用程序 - ???? [http-nio-8081-exec-4] .... WARN - -- RestTemplate: POST 请求“ http://localhost:8080/uaa/oauth/token ”导致 401(空);调用错误处理程序
我不确定问题是什么。看起来在对 oauth/token 的调用中,它还应该发送 client_id 和 client_secret?但从上面的日志来看,它似乎没有发送它们。是这个问题吗?如果是,为什么不发送这些参数?有任何想法吗?
解决方案
推荐阅读
- azure - 如何通过代码配置 Azure Function 身份验证?
- arduino - 如何修复“因中断而中断的 2 个微控制器之间的 I2C 通信”
- python - python 正则表达式也用换行符查找值
- jquery - 未捕获的 TypeError - jQuery fadeOut 不是函数
- c++ - 移动到左值引用时,std::move 会导致切片吗?
- sql - 如何处理包含长期支持 (LTS) 软件版本中的数据库迁移的补丁
- .net - dotnet ef 数据库更新 - 数据库已存在
- python - 如何在 Django 中正确打印模型对象?
- android - 电话上的本地主机自签名证书问题
- html - 为什么选择 DOM 元素