Skip to content

Commit

Permalink
Fix broken sample code in Authorize HttpServletRequests
Browse files Browse the repository at this point in the history
Signed-off-by: Taeik Lim <[email protected]>
  • Loading branch information
acktsap authored and marcusdacoregio committed Jan 3, 2024
1 parent 6f3a1fe commit 6c5b3d6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ Java::
SecurityFilterChain web(HttpSecurity http) throws Exception {
http
.authorizeHttpRequests((authorize) -> authorize
.requestMatchers("/endpoint").hasAuthority('USER')
.requestMatchers("/endpoint").hasAuthority("USER")
.anyRequest().authenticated()
)
// ...
Expand All @@ -205,7 +205,7 @@ Kotlin::
SecurityFilterChain web(HttpSecurity http) throws Exception {
http {
authorizeHttpRequests {
authorize("/endpoint", hasAuthority('USER'))
authorize("/endpoint", hasAuthority("USER"))
authorize(anyRequest, authenticated)
}
}
Expand Down

0 comments on commit 6c5b3d6

Please sign in to comment.