Package org.apache.solr.security
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. 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAuthorizationContext.CollectionRequeststatic classAuthorizationContext.RequestType 
- 
Constructor Summary
Constructors Constructor Description AuthorizationContext() 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract List<AuthorizationContext.CollectionRequest>getCollectionRequests()abstract ObjectgetHandler()abstract Enumeration<String>getHeaderNames()abstract StringgetHttpHeader(String header)abstract StringgetHttpMethod()abstract org.apache.solr.common.params.SolrParamsgetParams()abstract StringgetRemoteAddr()abstract StringgetRemoteHost()abstract AuthorizationContext.RequestTypegetRequestType()abstract StringgetResource()abstract StringgetUserName()This method returns the name of the authenticated user for the current request.abstract PrincipalgetUserPrincipal()This method returns thePrincipalcorresponding to the authenticated user for the current request. 
 - 
 
- 
- 
Method Detail
- 
getParams
public abstract org.apache.solr.common.params.SolrParams getParams()
 
- 
getUserPrincipal
public abstract Principal getUserPrincipal()
This method returns thePrincipalcorresponding to the authenticated user for the current request. The value returned byPrincipal.getName()depends on the authentication mechanism used (e.g. for user "foo" with BASIC authentication the result would be "foo". On the other hand with KERBEROS it would be foo@REALMNAME). 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
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:
 - user name in case of an authenticated user null in case of unauthenticated request
 
 
- 
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()
 
 - 
 
 -