Class AuthorizationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- io.micronaut.security.authentication.AuthorizationException
-
- All Implemented Interfaces:
java.io.Serializable
public class AuthorizationException extends java.lang.RuntimeExceptionException thrown when access to a protected resource is denied.- Since:
- 1.4.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AuthorizationException(Authentication authentication)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthenticationgetAuthentication()booleanisForbidden()
-
-
-
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
-
-