/oauth/check_token 401

论坛 期权论坛 脚本     
已经匿名di用户   2022-3-21 23:41   1944   0

https://www.jianshu.com/p/c1297003c903

检查token的接口无法使用

此接口没有允许,默认是不允许访问

方法一

// AuthorizationServerConfigurerAdapter

    @Override
    public void configure(AuthorizationServerSecurityConfigurer oauthServer) throws Exception {
        //允许表单认证
        oauthServer.allowFormAuthenticationForClients();
        oauthServer.checkTokenAccess("permitAll()");
    }

方法二

security.oauth2.authorization.check-token-access=permitAll()

参考 https://stackoverflow.com/questions/26750999/spring-security-oauth2-check-token-endpoint



作者:小狐记忆
链接:https://www.jianshu.com/p/c1297003c903
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:81
帖子:4969
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP