Package org.wildfly.security.authz
Class AuthorizationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- java.lang.SecurityException
-
- org.wildfly.security.authz.AuthorizationException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AuthorizationCheckException
,AuthorizationFailureException
public abstract class AuthorizationException extends SecurityException
A general authorization exception.- Author:
- David M. Lloyd
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private Principal
authorizationPrincipal
private static long
serialVersionUID
-
Constructor Summary
Constructors Modifier Constructor Description protected
AuthorizationException(String msg, Throwable cause, Principal authorizationPrincipal)
Constructs a newAuthorizationException
instance with an initial message and cause.protected
AuthorizationException(String msg, Principal authorizationPrincipal)
Constructs a newAuthorizationException
instance with an initial message.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Principal
getAuthorizationPrincipal()
Get the principal being authorized.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
authorizationPrincipal
private final Principal authorizationPrincipal
-
-
Constructor Detail
-
AuthorizationException
protected AuthorizationException(String msg, Principal authorizationPrincipal)
Constructs a newAuthorizationException
instance with an initial message. No cause is specified.- Parameters:
msg
- the messageauthorizationPrincipal
- the principal being authorized
-
AuthorizationException
protected AuthorizationException(String msg, Throwable cause, Principal authorizationPrincipal)
Constructs a newAuthorizationException
instance with an initial message and cause.- Parameters:
msg
- the messagecause
- the causeauthorizationPrincipal
- the principal being authorized
-
-
Method Detail
-
getAuthorizationPrincipal
public Principal getAuthorizationPrincipal()
Get the principal being authorized.- Returns:
- the principal being authorized
-
-