Class SubjectSecurityContext
- java.lang.Object
-
- org.apache.activemq.security.SecurityContext
-
- org.apache.activemq.shiro.subject.SubjectSecurityContext
-
public class SubjectSecurityContext extends SecurityContext
ActiveMQSecurityContext
implementation that retains a ShiroSubject
instance for use during security checks and other security-related operations.- Since:
- 5.10.0
-
-
Field Summary
-
Fields inherited from class org.apache.activemq.security.SecurityContext
BROKER_SECURITY_CONTEXT
-
-
Constructor Summary
Constructors Constructor Description SubjectSecurityContext(SubjectConnectionReference conn)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConcurrentMap<ActiveMQDestination,ActiveMQDestination>
getAuthorizedWriteDests()
Set<Principal>
getPrincipals()
org.apache.shiro.subject.Subject
getSubject()
String
getUserName()
boolean
isInOneOf(Set<?> allowedPrincipals)
-
Methods inherited from class org.apache.activemq.security.SecurityContext
isBrokerContext
-
-
-
-
Constructor Detail
-
SubjectSecurityContext
public SubjectSecurityContext(SubjectConnectionReference conn)
-
-
Method Detail
-
getSubject
public org.apache.shiro.subject.Subject getSubject()
-
getUserName
public String getUserName()
- Overrides:
getUserName
in classSecurityContext
-
isInOneOf
public boolean isInOneOf(Set<?> allowedPrincipals)
- Overrides:
isInOneOf
in classSecurityContext
-
getAuthorizedWriteDests
public ConcurrentMap<ActiveMQDestination,ActiveMQDestination> getAuthorizedWriteDests()
- Overrides:
getAuthorizedWriteDests
in classSecurityContext
-
getPrincipals
public Set<Principal> getPrincipals()
- Specified by:
getPrincipals
in classSecurityContext
-
-