我正在使用这篇文章中的 wso2is 服务器进行 Spring Boot Security 示例 https://github.com/angel-git/wso2is-springoauth ,当我尝试使用访问 token 访问资源时,我得到 p>
{"error":"unauthorized","error_description":"Full authentication is required to access this resource"}
我通过以下方式生成访问 token :
curl -u CLIENT_ID:CLIENT_SECRET-k -d "grant_type=password&username=admin&password=admin" -H "Content-Type:application/x-www-form-urlencoded" https://localhost:9443/oauth2/token
并通过以下方式访问资源:
curl -H GET "Authorization: ACCESS_TOKEN" http://localhost:8080/greeting
我在 stackoverflow 上找到了很多解决方案,但不幸的是无法解决我的问题
请帮忙,谢谢
最佳答案
我收到了相同的错误消息
"curl http://localhost:8080/spring4/beans" :
{"timestamp":1493591079040,"status":401,"error":"Unauthorized","message":"Full authentication is required to access this resource.","path":"/spring4/beans"}
在 application.properties
中设置以下属性绕过了安全检查,我可以使用所有 acuator 端点:
management.security.enabled=false
关于security - Spring 启动: Full authentication is required to access this resource,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37612648/