Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/340.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 尽管允许对该端点的所有调用,但Auth0仍出现403错误?_Java_Spring_Auth0 - Fatal编程技术网

Java 尽管允许对该端点的所有调用,但Auth0仍出现403错误?

Java 尽管允许对该端点的所有调用,但Auth0仍出现403错误?,java,spring,auth0,Java,Spring,Auth0,我使用Spring项目设置了Auth0,以添加身份验证/授权。它工作得很好,但是当我调用“/user/login”端点时,当它应该允许所有请求时,我得到一个403错误 这是我的自定义配置: @Override protected void configure(HttpSecurity http) throws Exception { http.cors().and().csrf().disable().authorizeRequests() .antMatcher

我使用Spring项目设置了Auth0,以添加身份验证/授权。它工作得很好,但是当我调用“/user/login”端点时,当它应该允许所有请求时,我得到一个403错误

这是我的自定义配置:

@Override
protected void configure(HttpSecurity http) throws Exception {
    http.cors().and().csrf().disable().authorizeRequests()
            .antMatchers(HttpMethod.POST, SIGN_UP_URL).permitAll()
            .antMatchers(HttpMethod.POST, LOGIN_URL).permitAll()
            .anyRequest().authenticated()
            .and()
            .addFilter(new JWTAuthenticationFilter(authenticationManager()))
            .addFilter(new JWTAuthorizationFilter(authenticationManager()))
            // this disables session creation on Spring Security
            .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS);
}
对于注册url来说,它工作得非常好


什么可能导致此问题?

您确定端点相同吗?还要检查方法是否为POST。另外,试着检查授权过滤器是否以403代码响应。谢谢,我找到了答案。原来我送的尸体是不正确的。。。谢谢你!