Skip to content

关于 springboot 1.5.X版本不能兼容的问题修复如下 [email protected] #4

@Deament

Description

@Deament

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();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions