Interface ConnectionSubjectFactory
-
- All Known Implementing Classes:
DefaultConnectionSubjectFactory
public interface ConnectionSubjectFactoryAConnectionSubjectFactorycreates aSubjectinstance that represents the connection client's identity. Most implementations will simply use theSubject.Builderto create an anonymousSubjectinstance and let a downstreamAuthenticationFilterauthenticate theSubjectbased on any credentials associated with the connection. After authentication, theSubjectwill have an identity, and this is the expected flow for most connection clients. However, if there is some other data associated with the connection that can be inspected to create aSubjectinstance beyond what theDefaultConnectionSubjectFactoryprovides, this interface allows that logic to be plugged in as necessary.- Since:
- 5.10.0
- See Also:
DefaultConnectionSubjectFactory
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.apache.shiro.subject.SubjectcreateSubject(ConnectionReference ref)Creates aSubjectinstance representing the connection client.
-
-
-
Method Detail
-
createSubject
org.apache.shiro.subject.Subject createSubject(ConnectionReference ref)
Creates aSubjectinstance representing the connection client. It is common forSubjectinstances returned from this method to be anonymous until a downstreamAuthenticationFilterauthenticates the subject to associate an identity.- Parameters:
ref- a reference to the client's connection metadata- Returns:
- a
Subjectinstance representing the connection client.
-
-