Fix AuthenticationPrincipalArgumentResolver xml doc
Fixes gh-3771
This commit is contained in:
parent
337a7ed35e
commit
81c9fa805f
|
@ -6576,10 +6576,13 @@ Spring Security provides `AuthenticationPrincipalArgumentResolver` which can aut
|
||||||
|
|
||||||
[source,xml]
|
[source,xml]
|
||||||
----
|
----
|
||||||
<bean class="org.springframework.security.web.method.annotation.AuthenticationPrincipalArgumentResolver" />
|
<mvc:annotation-driven>
|
||||||
|
<mvc:argument-resolvers>
|
||||||
|
<bean class="org.springframework.security.web.method.annotation.AuthenticationPrincipalArgumentResolver" />
|
||||||
|
</mvc:argument-resolvers>
|
||||||
|
</mvc:annotation-driven>
|
||||||
----
|
----
|
||||||
|
|
||||||
|
|
||||||
Once `AuthenticationPrincipalArgumentResolver` is properly configured, you can be entirely decoupled from Spring Security in your Spring MVC layer.
|
Once `AuthenticationPrincipalArgumentResolver` is properly configured, you can be entirely decoupled from Spring Security in your Spring MVC layer.
|
||||||
|
|
||||||
Consider a situation where a custom `UserDetailsService` that returns an `Object` that implements `UserDetails` and your own `CustomUser` `Object`. The `CustomUser` of the currently authenticated user could be accessed using the following code:
|
Consider a situation where a custom `UserDetailsService` that returns an `Object` that implements `UserDetails` and your own `CustomUser` `Object`. The `CustomUser` of the currently authenticated user could be accessed using the following code:
|
||||||
|
|
Loading…
Reference in New Issue