Package com.jgcomptech.tools.authc
Class UnauthenticatedException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.jgcomptech.tools.authz.AuthorizationException
-
- com.jgcomptech.tools.authc.UnauthenticatedException
-
- All Implemented Interfaces:
java.io.Serializable
public class UnauthenticatedException extends AuthorizationException
Exception thrown when attempting to execute an authorization action when a successful authentication hasn't yet occurred.Authorizations can only be performed after a successful authentication because authorization data (roles, permissions, etc) must always be associated with a known identity. Such a known identity can only be obtained upon a successful log-in.
- Since:
- 1.5.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UnauthenticatedException()
Creates a new UnauthenticatedException.UnauthenticatedException(java.lang.String message)
Constructs a new UnauthenticatedException.UnauthenticatedException(java.lang.String message, java.lang.Throwable cause)
Constructs a new UnauthenticatedException.UnauthenticatedException(java.lang.Throwable cause)
Constructs a new UnauthenticatedException.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
assertThrown(@NotNull java.lang.Runnable runnable)
Asserts that the specified runnable throws this exception and if not throws an junit assertion failure.
-
-
-
Constructor Detail
-
UnauthenticatedException
public UnauthenticatedException()
Creates a new UnauthenticatedException.
-
UnauthenticatedException
public UnauthenticatedException(java.lang.String message)
Constructs a new UnauthenticatedException.- Parameters:
message
- the reason for the exception
-
UnauthenticatedException
public UnauthenticatedException(java.lang.Throwable cause)
Constructs a new UnauthenticatedException.- Parameters:
cause
- the underlying Throwable that caused this exception to be thrown
-
UnauthenticatedException
public UnauthenticatedException(java.lang.String message, java.lang.Throwable cause)
Constructs a new UnauthenticatedException.- Parameters:
message
- the reason for the exceptioncause
- the underlying Throwable that caused this exception to be thrown
-
-