Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于 springboot 1.5.X版本不能兼容的问题修复如下 591518884@qq.com #4

Open
Deament opened this issue Aug 8, 2018 · 0 comments

Comments

@Deament
Copy link

Deament commented Aug 8, 2018

1.5.X可以运行 你少了一些代码 参考

https://blog.csdn.net/u012040869/article/details/80140515

修改 AuthorizationServerConfiguration 类即可

@OverRide
public void configure(AuthorizationServerSecurityConfigurer oauthServer) throws Exception {
oauthServer.tokenKeyAccess("isAnonymous() || hasAuthority('ROLE_TRUSTED_CLIENT')");
oauthServer.checkTokenAccess("hasAuthority('ROLE_TRUSTED_CLIENT')");
//如果没有支持allowFormAuthenticationForClients或者有支持但是url中没有client_id和client_secret的,走basic认证保护
//https://blog.csdn.net/u012040869/article/details/80140515
//springboot 1.5.x 版本必须
oauthServer.allowFormAuthenticationForClients();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant