Skip to content

Commit 6ab9cc6

Browse files
Merge branch '6.1.x'
2 parents 9eee988 + 2158d26 commit 6ab9cc6

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

docs/modules/ROOT/pages/servlet/architecture.adoc

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,10 @@ However, there are times that it is beneficial to know the ordering, if you want
171171

172172
To exemplify the above paragraph, let's consider the following security configuration:
173173

174-
====
175-
.Java
174+
[tabs]
175+
======
176+
Java::
177+
+
176178
[source,java,role="primary"]
177179
----
178180
@Configuration
@@ -193,7 +195,9 @@ public class SecurityConfig {
193195
194196
}
195197
----
196-
.Kotlin
198+
199+
Kotlin::
200+
+
197201
[source,kotlin,role="secondary"]
198202
----
199203
import org.springframework.security.config.web.servlet.invoke
@@ -217,7 +221,7 @@ class SecurityConfig {
217221
218222
}
219223
----
220-
====
224+
======
221225

222226
The above configuration will result in the following `Filter` ordering:
223227

@@ -333,8 +337,9 @@ Instead of implementing `Filter`, you can extend from {spring-framework-api-url}
333337

334338
Now, we need to add the filter to the security filter chain.
335339

336-
====
337-
.Java
340+
======
341+
Java::
342+
+
338343
[source,java,role="primary"]
339344
----
340345
@Bean
@@ -345,7 +350,9 @@ SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
345350
return http.build();
346351
}
347352
----
348-
.Kotlin
353+
354+
Kotlin::
355+
+
349356
[source,kotlin,role="secondary"]
350357
----
351358
@Bean
@@ -356,7 +363,7 @@ fun filterChain(http: HttpSecurity): SecurityFilterChain {
356363
return http.build()
357364
}
358365
----
359-
====
366+
======
360367

361368
<1> Use `HttpSecurity#addFilterBefore` to add the `TenantFilter` before the `AuthorizationFilter`.
362369

docs/modules/ROOT/pages/servlet/authentication/architecture.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ If it contains a value, it is used as the currently authenticated user.
3131
The simplest way to indicate a user is authenticated is to set the `SecurityContextHolder` directly:
3232

3333
.Setting `SecurityContextHolder`
34-
====
34+
3535
[tabs]
3636
======
3737
Java::
@@ -66,7 +66,7 @@ Here, we use `TestingAuthenticationToken`, because it is very simple.
6666
A more common production scenario is `UsernamePasswordAuthenticationToken(userDetails, password, authorities)`.
6767
<3> Finally, we set the `SecurityContext` on the `SecurityContextHolder`.
6868
Spring Security uses this information for xref:servlet/authorization/index.adoc#servlet-authorization[authorization].
69-
====
69+
7070

7171
To obtain information about the authenticated principal, access the `SecurityContextHolder`.
7272

0 commit comments

Comments
 (0)