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

时间:2020-02-15 16:57:18

标签: java spring auth0

我在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);
}

对于注册网址,它工作得很好。

什么可能导致此问题?

0 个答案:

没有答案