![JAR search and dependency download from the Maven repository](/logo.png)
nyla.solutions.global.exception.AuthenticationFailedFaultException Maven / Gradle / Ivy
package nyla.solutions.global.exception;
/**
* Security related error
* @author Gregory Green
*
*/
public class AuthenticationFailedFaultException extends SecurityException
{
public static final String DEFAULT_ERROR_CODE = "SC0003";
/**
*
* @param functionName the function name
*/
public AuthenticationFailedFaultException(Exception exception, String username)
{
super(exception);
this.setCode(DEFAULT_ERROR_CODE);
this.username = username;
}// -----------------------------------------------
/**
*
* @param functionName the function name
*/
public AuthenticationFailedFaultException(String message, String username)
{
super(message+" user:"+username);
this.setCode(DEFAULT_ERROR_CODE);
this.username = username;
}// -----------------------------------------------
/**
*
* @param functionName the function name
*/
public AuthenticationFailedFaultException(String message, Exception e, String username)
{
super(message+" user:"+username, e);
this.setCode(DEFAULT_ERROR_CODE);
this.username = username;
}// -----------------------------------------------
/**
*
* @param functionName the function name
*/
public AuthenticationFailedFaultException(String username)
{
super("Authentication Failed for user:"+username);
this.setCode(DEFAULT_ERROR_CODE);
this.username = username;
}// -----------------------------------------------
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public String toString()
{
return "AuthenticationFailedException [username=" + username
+ ", toString()=" + super.toString() + "]";
}// -----------------------------------------------
/**
* @return the username
*/
public String getUsername()
{
return username;
}
private String username = null;
/**
*
*/
private static final long serialVersionUID = -3062061475584757100L;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy