diff --git a/src/docbkx/technical-overview.xml b/src/docbkx/technical-overview.xml index 536633e02b..7f7050b207 100644 --- a/src/docbkx/technical-overview.xml +++ b/src/docbkx/technical-overview.xml @@ -33,6 +33,9 @@ system, so it's important to understand that they're there, even if you don't need to directly interact with them. + +
+ SecurityContextHolder, SecurityContext and Authentication Objects The most fundamental object is SecurityContextHolder. This is where we store details of the present security context of the application, which @@ -87,15 +90,25 @@ if (obj instanceof UserDetails) { object between SecurityContextHolder and Authentication. The SecurityContextHolder.getContext() method is - actually returning a SecurityContext. Spring + actually returning a SecurityContext. + + + +
+ +
+ The UserDetailsService Another item to note from the above code fragment is that you can obtain a principal from the Authentication @@ -133,6 +146,11 @@ if (obj instanceof UserDetails) { whatever your UserDetailsService returns can always be obtained from the SecurityContextHolder, as per the above code fragment. +
+ + +
+ GrantedAuthority Besides the principal, another important method provided by Authentication is @@ -171,7 +189,12 @@ if (obj instanceof UserDetails) { for security purposes. There is simply no justification for doing so - always use the SecurityContextHolder instead. - + +
+ + +
+ Summary Just to recap, the major building blocks of Spring Security are: @@ -220,6 +243,7 @@ if (obj instanceof UserDetails) { Now that you've gained an understanding of these repeatedly-used components, let's take a closer look at the process of authentication. +
@@ -384,7 +408,8 @@ if (obj instanceof UserDetails) { do this, and it is a fully-supported integration approach.
-
Secure Objects +
+ Secure Objects If you're familiar with AOP, you'd be aware there are different @@ -501,8 +526,8 @@ if (obj instanceof UserDetails) { transparency.
-
Conclusion - +
+ Conclusion Congratulations! You have enough of a high-level picture of Spring Security to embark on your project. We've explored the shared