相关疑难解决方法(0)

Spring-Security-Oauth2:访问此资源需要完全身份验证

我正在尝试使用spring-security-oauth2.0基于Java的配置.我的配置已完成,但是当我在tomcat上部署应用程序并点击/oauth/token访问令牌的url时,会Oauth生成以下错误:

<oauth>
<error_description>Full authentication is required to access this resource</error_description>
<error>unauthorized</error>
</oauth>
Run Code Online (Sandbox Code Playgroud)

我的配置在Git中心,请点击链接

代码很大,所以请参考git.我正在使用chrome postman客户端发送请求.以下是我的要求.

POST /dummy-project-web/oauth/token HTTP/1.1
Host: localhost:8081
Cache-Control: no-cache
Content-Type: application/x-www-form-urlencoded

grant_type=client_credentials&client_id=abc%40gmail.com&client_secret=12345678 
Run Code Online (Sandbox Code Playgroud)

错误就像,URL是安全的Oauth,但在配置中,我给予访问此URL的所有权限.这个问题究竟是什么?

java unauthorized oauth-2.0 spring-security-oauth2

30
推荐指数
3
解决办法
10万
查看次数