Package org.apache.activemq.shiro
Interface SecurityContextFactory
- All Known Implementing Classes:
DefaultSecurityContextFactory
public interface SecurityContextFactory
A
SecurityContextFactory returns a SecurityContext instance that retains a client
connection's Subject instance.
It should be noted that at the time a SecurityContextFactory is invoked, a Subject is already
associated with the client connection. A SecurityContextFactory is merely responsible for creating
a Shiro-specific SecurityContext instance.
The returned SecurityContext instance will then be made available to any downstream Broker Filters via
connectionContext.getSecurityContext()
to ensure it may be used for Shiro-based security checks.- Since:
- 5.10.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionCreates a newSecurityContextretaining the client connection'sSubjectinstance.
-
Method Details
-
createSecurityContext
Creates a newSecurityContextretaining the client connection'sSubjectinstance. It should be noted that at the time aSecurityContextFactoryis invoked, aSubjectis already associated with the client connection. ASecurityContextFactoryis merely responsible for creating a Shiro-specificSecurityContextinstance. The returnedSecurityContextinstance will then be made available to any downstream Broker Filters viaconnectionContext.getSecurityContext()to ensure it may be used for Shiro-based security checks.- Parameters:
ref- the client's connection and subject- Returns:
- a new
SecurityContextretaining the client connection'sSubjectinstance. - See Also:
-