Class AuthorizationException

  • All Implemented Interfaces:
    java.io.Serializable

    public class AuthorizationException
    extends java.lang.RuntimeException
    Exception thrown when access to a protected resource is denied.
    Since:
    1.4.0
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Authentication getAuthentication()  
      boolean isForbidden()  
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • AuthorizationException

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

      • isForbidden

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

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