public class ERXBasicAuthenticationException extends SecurityException
ERXBasicAuthenticationException
can be thrown when performing an action
containing invalid credentials.
Usage:
protected void checkAccess() throws SecurityException {
if (invalidCredentials) {
throw new ERXBasicAuthenticationException("Invalid credentials");
}
}
Constructor and Description |
---|
ERXBasicAuthenticationException(String message)
Creates a
ERXBasicAuthenticationException with the specified
detail message and the default realm. |
ERXBasicAuthenticationException(String message,
String realm)
Creates a
ERXBasicAuthenticationException with the specified
detail message and realm. |
ERXBasicAuthenticationException(String message,
Throwable cause)
Creates a
ERXBasicAuthenticationException with the specified
detail message and cause using the default realm. |
ERXBasicAuthenticationException(String message,
Throwable cause,
String realm)
Creates a
ERXBasicAuthenticationException with the specified
detail message, cause and realm. |
Modifier and Type | Method and Description |
---|---|
String |
realm()
The realm for which the credentials are used.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public ERXBasicAuthenticationException(String message)
ERXBasicAuthenticationException
with the specified
detail message and the default realm.message
- the detail message (which is saved for later retrieval
by the Throwable.getMessage()
method).public ERXBasicAuthenticationException(String message, String realm)
ERXBasicAuthenticationException
with the specified
detail message and realm.message
- the detail message (which is saved for later retrieval
by the Throwable.getMessage()
method).realm
- the realm for which the credentials are usedpublic ERXBasicAuthenticationException(String message, Throwable cause)
ERXBasicAuthenticationException
with the specified
detail message and cause using the default realm.message
- the detail message (which is saved for later retrieval
by the Throwable.getMessage()
method).cause
- the cause (which is saved for later retrieval by the
Throwable.getCause()
method). (A null value is permitted,
and indicates that the cause is nonexistent or unknown.)public ERXBasicAuthenticationException(String message, Throwable cause, String realm)
ERXBasicAuthenticationException
with the specified
detail message, cause and realm.message
- the detail message (which is saved for later retrieval
by the Throwable.getMessage()
method).cause
- the cause (which is saved for later retrieval by the
Throwable.getCause()
method). (A null value is permitted,
and indicates that the cause is nonexistent or unknown.)realm
- the realm for which the credentials are usedpublic String realm()
Copyright © 2002 – 2024 Project Wonder.