Fixed JWT Role assignment and method access
This commit is contained in:
@@ -24,7 +24,7 @@ public class SecurityConfiguration {
|
||||
.csrf(csrf -> csrf.disable())
|
||||
.authorizeHttpRequests(auth -> auth
|
||||
.requestMatchers("/api/v1/auth/**").permitAll()
|
||||
.requestMatchers("/encomes").hasRole("ADMIN")
|
||||
.requestMatchers("/expenses").hasRole("ADMIN")
|
||||
.anyRequest().authenticated()
|
||||
)
|
||||
.sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
|
||||
|
||||
Reference in New Issue
Block a user