Class DefaultHttpCredentialsPlugin

java.lang.Object
org.apache.storm.security.auth.DefaultHttpCredentialsPlugin
All Implemented Interfaces:
IHttpCredentialsPlugin

public class DefaultHttpCredentialsPlugin extends Object implements IHttpCredentialsPlugin
  • Constructor Details

    • DefaultHttpCredentialsPlugin

      public DefaultHttpCredentialsPlugin()
  • Method Details

    • prepare

      public void prepare(Map<String,Object> topoConf)
      No-op.
      Specified by:
      prepare in interface IHttpCredentialsPlugin
      Parameters:
      topoConf - Storm configuration
    • getUserName

      public String getUserName(javax.servlet.http.HttpServletRequest req)
      Gets the user name from the request principal.
      Specified by:
      getUserName in interface IHttpCredentialsPlugin
      Parameters:
      req - the servlet request
      Returns:
      the authenticated user, or null if none is authenticated
    • populateContext

      public ReqContext populateContext(ReqContext context, javax.servlet.http.HttpServletRequest req)
      Populates a given context with a new Subject derived from the credentials in a servlet request.
      Specified by:
      populateContext in interface IHttpCredentialsPlugin
      Parameters:
      context - the context to be populated
      req - the servlet request
      Returns:
      the context