Package org.apache.storm.security.auth
Class ReqContext
java.lang.Object
org.apache.storm.security.auth.ReqContext
Request context. Context request context includes info about:
- remote address
- remote subject and primary principal
- request ID
-
Constructor Summary
ConstructorDescriptionReqContext
(AccessControlContext aclCtxt) ReqContext
(Subject sub) ReqContext
(ReqContext other) Copy Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic ReqContext
context()
Get context.boolean
Check whether context is impersonating.The primary principal associated current subject.The real principal associated with the subject.int
request ID of this request.static void
reset()
Reset the context back to a default.void
setRealPrincipal
(Principal realPrincipal) void
setRemoteAddress
(InetAddress addr) client address.void
setSubject
(Subject subject) Set remote subject explicitly.subject()
Retrieve client subject associated with this request context.toString()
-
Constructor Details
-
ReqContext
-
ReqContext
-
ReqContext
Copy Constructor.
-
-
Method Details
-
context
Get context.- Returns:
- a request context associated with current thread
-
reset
public static void reset()Reset the context back to a default. used for testing. -
toString
-
setRemoteAddress
client address. -
remoteAddress
-
setSubject
Set remote subject explicitly. -
subject
Retrieve client subject associated with this request context. -
principal
The primary principal associated current subject. -
setRealPrincipal
-
realPrincipal
The real principal associated with the subject. -
isImpersonating
public boolean isImpersonating()Check whether context is impersonating.- Returns:
- true if this request is an impersonation request.
-
requestID
public int requestID()request ID of this request.
-