Package org.apache.solr.security
Class AuthorizationContext
java.lang.Object
org.apache.solr.security.AuthorizationContext
- Direct Known Subclasses:
HttpServletAuthorizationContext
Request context for Solr to be used by Authorization plugin.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enum -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract List<AuthorizationContext.CollectionRequest> abstract Objectabstract Enumeration<String> abstract StringgetHttpHeader(String header) abstract Stringabstract org.apache.solr.common.params.SolrParamsabstract Stringabstract Stringabstract AuthorizationContext.RequestTypeabstract Stringabstract StringThis method returns the name of the authenticated user for the current request.abstract PrincipalThis method returns thePrincipalcorresponding to the authenticated user for the current request.
-
Constructor Details
-
AuthorizationContext
public AuthorizationContext()
-
-
Method Details
-
getParams
public abstract org.apache.solr.common.params.SolrParams getParams() -
getUserPrincipal
This method returns thePrincipalcorresponding to the authenticated user for the current request. The value returned byPrincipal.getName()depends on the authentication mechanism used. For example for the user "foo" with BASIC authentication the result would be "foo". ThegetUserName()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
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
-
getHeaderNames
-
getRemoteAddr
-
getRemoteHost
-
getCollectionRequests
-
getRequestType
-
getResource
-
getHttpMethod
-
getHandler
-