Prezados, boa tarde. Eu add a dependência do openApi porém não consigo logar no swagger pelo browser...
Trace ...
java.lang.NullPointerException: token must not be null
Minha config
fun filterChain(http: HttpSecurity): SecurityFilterChain {
http.authorizeRequests()
?.antMatchers(HttpMethod.GET, "/swagger-ui/*")?.permitAll()
?.antMatchers(HttpMethod.GET, "/v3/api-docs/**")?.permitAll()
?.antMatchers("/api/topics")?.hasAuthority("READ_WRITE")
?.antMatchers(HttpMethod.POST,"/login")?.permitAll()
?.anyRequest()
?.authenticated()
?.and()
http.addFilterBefore(JWTLoginFilter(authManager = configuration.authenticationManager, jwtUtil = jwtUtil),
UsernamePasswordAuthenticationFilter().javaClass)
http.addFilterBefore(JwtAuthenticationFilter(jwtUtil = jwtUtil),
UsernamePasswordAuthenticationFilter().javaClass)
http.sessionManagement()
?.sessionCreationPolicy(SessionCreationPolicy.STATELESS)
?.and()
?.csrf()?.disable()
?.userDetailsService(authorService)
return http.build()