public interface ConnectionSubjectFactory
ConnectionSubjectFactory
creates a Subject
instance that represents the connection client's identity.
Most implementations will simply use the Subject.Builder
to create an anonymous
Subject
instance and let a downstream AuthenticationFilter
authenticate the Subject
based on
any credentials associated with the connection. After authentication, the Subject
will 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 a
Subject
instance beyond what the DefaultConnectionSubjectFactory
provides, this interface allows that
logic to be plugged in as necessary.DefaultConnectionSubjectFactory
Modifier and Type | Method and Description |
---|---|
org.apache.shiro.subject.Subject |
createSubject(ConnectionReference ref)
Creates a
Subject instance representing the connection client. |
org.apache.shiro.subject.Subject createSubject(ConnectionReference ref)
Subject
instance representing the connection client. It is common for Subject
instances
returned from this method to be anonymous until a downstream AuthenticationFilter
authenticates the
subject to associate an identity.ref
- a reference to the client's connection metadataSubject
instance representing the connection client.Copyright © 2005–2017. All rights reserved.