Module org.elasticsearch.xcore
Class AuthorizationEngine.AuthorizationResult
java.lang.Object
org.elasticsearch.xpack.core.security.authz.AuthorizationEngine.AuthorizationResult
- Direct Known Subclasses:
AuthorizationEngine.IndexAuthorizationResult
- Enclosing interface:
AuthorizationEngine
Represents the result of authorization to tell whether the actions should be granted
-
Constructor Summary
ConstructorsConstructorDescriptionAuthorizationResult(boolean granted) Create an authorization result with the provided granted value -
Method Summary
Modifier and TypeMethodDescriptiondeny()Returns a new authorization result that is deniedgetFailureContext(AuthorizationEngine.RequestInfo requestInfo, RestrictedIndices restrictedIndices) Returns additional context about an authorization failure, ifisGranted()is false.granted()Returns a new authorization result that is grantedboolean
-
Constructor Details
-
AuthorizationResult
public AuthorizationResult(boolean granted) Create an authorization result with the provided granted value
-
-
Method Details
-
isGranted
public boolean isGranted() -
getFailureContext
@Nullable public String getFailureContext(AuthorizationEngine.RequestInfo requestInfo, RestrictedIndices restrictedIndices) Returns additional context about an authorization failure, ifisGranted()is false. -
granted
Returns a new authorization result that is granted -
deny
Returns a new authorization result that is denied
-