Skip to content

Commit

Permalink
KL-184/fix: change authorize endpoint sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
ohhamma committed Oct 11, 2024
1 parent 34d14f4 commit 8576de0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti
// request authentication & authorization
.authorizeHttpRequests(authorizeRequests ->
authorizeRequests
.requestMatchers(getPublicEndpoints()).permitAll()
.requestMatchers(getBothEndpoints()).permitAll()
.requestMatchers(getUserRoleEndpoints()).hasRole(USER.name())
.requestMatchers(HttpMethod.POST).hasAnyRole(USER.name(), ADMIN.name())
.requestMatchers(HttpMethod.PUT).hasAnyRole(USER.name(), ADMIN.name())
.requestMatchers(HttpMethod.DELETE).hasAnyRole(USER.name(), ADMIN.name())
.requestMatchers(getUserRoleEndpoints()).hasRole(USER.name())
.requestMatchers(getBothEndpoints()).permitAll()
.requestMatchers(getPublicEndpoints()).permitAll()
.anyRequest().authenticated()
)

Expand Down

0 comments on commit 8576de0

Please sign in to comment.