Reputation: 469
We are using Swagger and and we need to use the browser in order to display swagger documentation. But For some reason, JWT doesn't allow chrome to access the application and gives access denied.
We followed this tutorial for JWT https://auth0.com/blog/securing-spring-boot-with-jwts/
Upvotes: 0
Views: 580
Reputation: 2884
that is cors option method problem. you need to grant access option method try this on security
public class CustomSecurity extends WebSecurityConfigurerAdapter{
@Override
protected void configure(HttpSecurity http) throws Exception {
http.csrf()
.disable()
.authorizeRequests().antMatchers(HttpMethod.OPTIONS).permitAll() ....
}
}
Upvotes: 1