Skip to content

Commit

Permalink
Change /user/code accessability
Browse files Browse the repository at this point in the history
  • Loading branch information
Fagorym committed Dec 10, 2023
1 parent 7b145c7 commit 8509f4d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,20 @@ public class SecurityConfiguration {
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
return http.csrf(AbstractHttpConfigurer::disable)
.authorizeHttpRequests(matcher -> matcher
.requestMatchers("/user/login", "/user/register", "/user/swagger-ui/**", "/user/api-docs/**")
.requestMatchers(
"/user/login",
"/user/register",
"/user/swagger-ui/**",
"/user/api-docs/**",
"/user/code"
)
.permitAll()
.anyRequest()
.authenticated()
)
.build();
}


@Bean
public WebSecurityCustomizer webSecurityCustomizer() {
return web -> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package ru.nsu.fit.directors.userservice.controller;

import lombok.AccessLevel;
import lombok.RequiredArgsConstructor;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.CrossOrigin;
Expand All @@ -19,7 +18,7 @@
*/
@RestController
@RequestMapping(value = "/user/code", produces = MediaType.APPLICATION_JSON_VALUE)
@RequiredArgsConstructor(access = AccessLevel.PUBLIC)
@RequiredArgsConstructor
@CrossOrigin(allowCredentials = "true", originPatterns = {"*"})
public class CodeController {
private final CodeService codeService;
Expand Down

0 comments on commit 8509f4d

Please sign in to comment.