mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-05-31 09:12:14 +00:00
Fix broken sample code in Authorize HttpServletRequests
Signed-off-by: Taeik Lim <sibera21@gmail.com>
This commit is contained in:
parent
6f3a1fe1cd
commit
6c5b3d69c5
@ -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()
|
||||
)
|
||||
// ...
|
||||
@ -205,7 +205,7 @@ Kotlin::
|
||||
SecurityFilterChain web(HttpSecurity http) throws Exception {
|
||||
http {
|
||||
authorizeHttpRequests {
|
||||
authorize("/endpoint", hasAuthority('USER'))
|
||||
authorize("/endpoint", hasAuthority("USER"))
|
||||
authorize(anyRequest, authenticated)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user