美文网首页
/oauth/check_token 401

/oauth/check_token 401

作者: 小狐记忆 | 来源:发表于2019-05-19 09:09 被阅读0次

    检查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

    相关文章

      网友评论

          本文标题:/oauth/check_token 401

          本文链接:https://www.haomeiwen.com/subject/tajfzqtx.html