Class AuthorizationException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.micronaut.security.authentication.AuthorizationException
All Implemented Interfaces:
Serializable

public class AuthorizationException extends RuntimeException
Exception thrown when access to a protected resource is denied.
Since:
1.4.0
Author:
James Kleeh
See Also:
  • Constructor Details

    • AuthorizationException

      public AuthorizationException(@Nullable @Nullable Authentication authentication)
      Parameters:
      authentication - The authentication that was denied, null if unauthorized
  • Method Details

    • isForbidden

      public boolean isForbidden()
      Returns:
      True if the request was authenticated
    • getAuthentication

      @Nullable public @Nullable Authentication getAuthentication()
      Returns:
      The authentication used in the request