-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreadme.dist
22 lines (20 loc) · 977 Bytes
/
readme.dist
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
3.02~3.03
<authentication-provider
user-service-ref="calendarUserDetailsService"/>
1、CalendarUserDetailsService is added to our Spring configuration automatically, since we leverage
classpath scanning and the @Component annotation.
2、Create a new class named CalendarUserDetailsService that will make Spring Security aware of our
CalendarUser object.
3、Removing references to UserDetailsManager
We need to remove the code we added in the DefaultCalendarService
that used UserDetailsManager to synchronize the Spring Security users
and CalendarUsers.
3.03~3.04
1、we will create a CalendarUserDetails
object, which can be referred to as both UserDetails and CalendarUser.
return (CalendarUser) authentication.getPrincipal(); 获得当前已认证的用户的名字(obtain the name of the currently authenticated user)
2、<div>
Welcome <sec:authentication property="principal.name" />
</div>
3.04~3.05
1、Creating a custom AuthenticationProvider object;