The previous section talked about subject, this time we will talk about how to form a subejct - using the subjectContext class. This class is a map , and then organizes all the properties that build a subject together, and then passes it to a subjectFactory , which is used to form a subject .
It also contains subject , and every time a new subject is created , it will try to call the getSubject method to obtain the original subject , but I added a breakpoint on setSubject , and never encountered the situation of setSubject .
The attributes used to make up the subject are:
Securitymanager,
request,
answer ,
session ( not httpSeesion, but session encapsulated by shiro , but there is no session when establishing subject ) ,
PrincipalCollection (obtained only from rememberMeManager when the subject is first created , and from the cookie when using the default cookieRememberMeManager )