Class AuthorizationResponse


  • public final class AuthorizationResponse
    extends SecurityResponse
    Response from an authorization decision.

    Responses that can be returned based on SecurityResponse.SecurityStatus:

    • Success - request is authorized an may proceed - see permit()
    • Failure - request is denied and must not proceed - see deny()
    • Abstain - the provider could not decide about this request - see abstain()
    • Method Detail

      • permit

        public static AuthorizationResponse permit()
        Permit the request.
        Returns:
        correctly initialized response
      • deny

        public static AuthorizationResponse deny()
        Deny the request.
        Returns:
        correctly initialized response
      • abstain

        public static AuthorizationResponse 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

        public static AuthorizationResponse.Builder 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.