Class AuthorizationContext

java.lang.Object
org.apache.solr.security.AuthorizationContext
Direct Known Subclasses:
HttpServletAuthorizationContext

public abstract class AuthorizationContext extends Object
Request context for Solr to be used by Authorization plugin.
  • Constructor Details

    • AuthorizationContext

      public AuthorizationContext()
  • Method Details

    • getParams

      public abstract org.apache.solr.common.params.SolrParams getParams()
    • getUserPrincipal

      public abstract Principal getUserPrincipal()
      This method returns the Principal corresponding to the authenticated user for the current request. The value returned by Principal.getName() depends on the authentication mechanism used. For example for the user "foo" with BASIC authentication the result would be "foo". The getUserName() method may be preferred to extract the identity of the authenticated user instead of this method.
      Returns:
      user principal in case of an authenticated request null in case of unauthenticated request
    • getUserName

      public abstract String getUserName()
      This method returns the name of the authenticated user for the current request. The return value of this method is agnostic of the underlying authentication mechanism used.
      Returns:
      username in case of an authenticated user null in case of unauthenticated request
    • getHttpHeader

      public abstract String getHttpHeader(String header)
    • getHeaderNames

      public abstract Enumeration<String> getHeaderNames()
    • getRemoteAddr

      public abstract String getRemoteAddr()
    • getRemoteHost

      public abstract String getRemoteHost()
    • getCollectionRequests

      public abstract List<AuthorizationContext.CollectionRequest> getCollectionRequests()
    • getRequestType

      public abstract AuthorizationContext.RequestType getRequestType()
    • getResource

      public abstract String getResource()
    • getHttpMethod

      public abstract String getHttpMethod()
    • getHandler

      public abstract Object getHandler()