Package org.apache.storm.security.auth
Class DefaultHttpCredentialsPlugin
java.lang.Object
org.apache.storm.security.auth.DefaultHttpCredentialsPlugin
- All Implemented Interfaces:
IHttpCredentialsPlugin
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetUserName
(javax.servlet.http.HttpServletRequest req) Gets the user name from the request principal.populateContext
(ReqContext context, javax.servlet.http.HttpServletRequest req) Populates a given context with a new Subject derived from the credentials in a servlet request.void
No-op.
-
Constructor Details
-
DefaultHttpCredentialsPlugin
public DefaultHttpCredentialsPlugin()
-
-
Method Details
-
prepare
No-op.- Specified by:
prepare
in interfaceIHttpCredentialsPlugin
- Parameters:
topoConf
- Storm configuration
-
getUserName
Gets the user name from the request principal.- Specified by:
getUserName
in interfaceIHttpCredentialsPlugin
- Parameters:
req
- the servlet request- Returns:
- the authenticated user, or null if none is authenticated
-
populateContext
Populates a given context with a new Subject derived from the credentials in a servlet request.- Specified by:
populateContext
in interfaceIHttpCredentialsPlugin
- Parameters:
context
- the context to be populatedreq
- the servlet request- Returns:
- the context
-