You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
现在修改EnableResourceServer的配置,可以进行认证了。但是我带着生成的token去访问index还是Unauthorized。以下是我的代码: @configuration
@EnableResourceServer @lazy
public class ResourceServerConfig extends ResourceServerConfigurerAdapter { @bean("resourceServerRequestMatcher")
public RequestMatcher resources() {
return new AntPathRequestMatcher("/resources/**");
}
配置了@EnableResourceServer重启后,访问http://localhost:8080/oauth/authorize?response_type=code&client_id=test&redirect_uri=http://www.baidu.com&scope=all 重定向到http://localhost:8080/login 报401错误。页面显示如下:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<error_description>
Full authentication is required to access this resource
</error_description>
unauthorized
这个是什么原因,在没有添加@EnableResourceServer注解的时候还可以正常获取授权码,可以获取token。希望看到的大佬给点帮助。谢谢大佬了
The text was updated successfully, but these errors were encountered: