Class AuthorizationResponse
java.lang.Object
io.helidon.security.SecurityResponse
io.helidon.security.AuthorizationResponse
Response from an authorization decision.
Responses that can be returned based on SecurityResponse.SecurityStatus:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for custom Authorization responses.Nested classes/interfaces inherited from class SecurityResponse
SecurityResponse.SecurityStatusModifier and TypeClassDescriptionstatic enumStatus of a security operation. -
Method Summary
Modifier and TypeMethodDescriptionstatic AuthorizationResponseabstain()This provider is not capable of making a decision about the resource (e.g.builder()Builder for fully customized authorization response.static AuthorizationResponsedeny()Deny the request.booleanReturns true if access to resource was permitted.static AuthorizationResponsepermit()Permit the request.Methods inherited from class SecurityResponse
description, requestHeaders, responseHeaders, status, statusCode, throwable, toStringModifier and TypeMethodDescriptionDescription of current security status.Get new request headers to be used.Get new response headers to be used.status()Status of this response.Status code (uses HTTP status codes for mapping).Get underlying throwable causing a failure state (if such happened).toString()
-
Method Details
-
permit
Permit the request.- Returns:
- correctly initialized response
-
deny
Deny the request.- Returns:
- correctly initialized response
-
abstain
This provider is not capable of making a decision about the resource (e.g. does not know the resource).- Returns:
- correctly initialized response
-
builder
Builder for fully customized authorization response.- Returns:
- Builder instance ready for configuration
-
isPermitted
public boolean isPermitted()Returns true if access to resource was permitted.- Returns:
- true if permitted, false if denied or abstained.
-