Skip to content

Commit 34102a6

Browse files
author
Steve Riesenberg
committed
Document default SecurityContextRepository
Issue gh-12049
1 parent dd9f954 commit 34102a6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Diff for: docs/modules/ROOT/pages/servlet/authentication/persistence.adoc

+6-2
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,15 @@ Cookie: SESSION=4c66e474-3f5a-43ed-8e48-cc1d8cb1d1c8
6666

6767
// FIXME: api documentation
6868
In Spring Security the association of the user to future requests is made using {security-api-url}org/springframework/security/web/context/SecurityContextRepository.html[`SecurityContextRepository`].
69+
The default implementation of `SecurityContextRepository` is {security-api-url}org/springframework/security/web/context/DelegatingSecurityContextRepository.html[`DelegatingSecurityContextRepository`] which delegates to the following:
70+
71+
* <<httpsecuritycontextrepository,`HttpSessionSecurityContextRepository`>>
72+
* <<requestattributesecuritycontextrepository,`RequestAttributeSecurityContextRepository`>>
6973

7074
[[httpsecuritycontextrepository]]
71-
=== HttpSecurityContextRepository
75+
=== HttpSessionSecurityContextRepository
7276

73-
The default implementation of `SecurityContextRepository` is {security-api-url}org/springframework/security/web/context/HttpSessionSecurityContextRepository.html[`HttpSessionSecurityContextRepository`] which associates the xref:servlet/authentication/architecture.adoc#servlet-authentication-securitycontext[`SecurityContext`] to the `HttpSession`.
77+
The {security-api-url}org/springframework/security/web/context/HttpSessionSecurityContextRepository.html[`HttpSessionSecurityContextRepository`] associates the xref:servlet/authentication/architecture.adoc#servlet-authentication-securitycontext[`SecurityContext`] to the `HttpSession`.
7478
Users can replace `HttpSessionSecurityContextRepository` with another implementation of `SecurityContextRepository` if they wish to associate the user with subsequent requests in another way or not at all.
7579

7680
[[nullsecuritycontextrepository]]

0 commit comments

Comments
 (0)