org.apache.storm.security.auth

## Class DefaultHttpCredentialsPlugin

- java.lang.Object
- - org.apache.storm.security.auth.DefaultHttpCredentialsPlugin

- All Implemented Interfaces:
    IHttpCredentialsPlugin

      public class DefaultHttpCredentialsPlugin
      extends Object
      implements IHttpCredentialsPlugin

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultHttpCredentialsPlugin()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getUserName(javax.servlet.http.HttpServletRequest req)` Gets the user name from the request principal.
    `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.
    `void` | `prepare(Map<String,Object> topoConf)` No-op.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultHttpCredentialsPlugin

          public DefaultHttpCredentialsPlugin()

  - ### Method Detail

    - #### 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

Copyright © 2021 The Apache Software Foundation. All rights reserved.