فهرست منبع

Fix broken sample code in Authorize HttpServletRequests

Signed-off-by: Taeik Lim <sibera21@gmail.com>
Taeik Lim 1 سال پیش
والد
کامیت
6c5b3d69c5
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      docs/modules/ROOT/pages/servlet/authorization/authorize-http-requests.adoc

+ 2 - 2
docs/modules/ROOT/pages/servlet/authorization/authorize-http-requests.adoc

@@ -188,7 +188,7 @@ Java::
 SecurityFilterChain web(HttpSecurity http) throws Exception {
 SecurityFilterChain web(HttpSecurity http) throws Exception {
 	http
 	http
 		.authorizeHttpRequests((authorize) -> authorize
 		.authorizeHttpRequests((authorize) -> authorize
-			.requestMatchers("/endpoint").hasAuthority('USER')
+			.requestMatchers("/endpoint").hasAuthority("USER")
 			.anyRequest().authenticated()
 			.anyRequest().authenticated()
 		)
 		)
         // ...
         // ...
@@ -205,7 +205,7 @@ Kotlin::
 SecurityFilterChain web(HttpSecurity http) throws Exception {
 SecurityFilterChain web(HttpSecurity http) throws Exception {
 	http {
 	http {
         authorizeHttpRequests {
         authorizeHttpRequests {
-            authorize("/endpoint", hasAuthority('USER'))
+            authorize("/endpoint", hasAuthority("USER"))
             authorize(anyRequest, authenticated)
             authorize(anyRequest, authenticated)
         }
         }
 	}
 	}