Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

While I am implementing swagger I am facing the issue #25329

Closed
SreedharLilly opened this issue Feb 26, 2024 · 0 comments
Closed

While I am implementing swagger I am facing the issue #25329

SreedharLilly opened this issue Feb 26, 2024 · 0 comments

Comments

@SreedharLilly
Copy link

SreedharLilly commented Feb 26, 2024

image

org.springdoc
springdoc-openapi-starter-webmvc-ui
2.0.2

@bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
http.csrf(csrf -> csrf.disable())
.exceptionHandling(exception -> exception.authenticationEntryPoint(unauthorizedHandler))
.sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
.authorizeHttpRequests(auth ->
auth.requestMatchers("/api/auth/").permitAll()
.requestMatchers("/api/test/").permitAll()
.requestMatchers(AntPathRequestMatcher.antMatcher("/**")).permitAll()
.anyRequest().authenticated()
);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants