net.unicon.cas.mfa.ticket.MultiFactorAuthenticationBaseTicketValidationException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cas-mfa-java Show documentation
Show all versions of cas-mfa-java Show documentation
This module is intended to include all the Java you need to add to a CAS implementation
to take advantage of the extended multifactor authentication features in this project.
package net.unicon.cas.mfa.ticket;
/**
* Base multifactor authentication exception class in the hierarchy.
* Defines the authentication code, the error message and the requested
* authentication method.
* @author Misagh Moayyed
* @see UnacceptableMultiFactorAuthenticationMethodException
* @see UnrecognizedMultiFactorAuthenticationMethodException
*/
public abstract class MultiFactorAuthenticationBaseTicketValidationException extends RuntimeException {
private static final long serialVersionUID = 7880539766094343828L;
private final String authenticationMethod;
private final String code;
/**
* Initialize the exception object.
* @param c the error code
* @param msg the error message describing this exception
* @param authnMethod the authentication method requested
*/
public MultiFactorAuthenticationBaseTicketValidationException(final String c, final String msg, final String authnMethod) {
super(msg);
this.code = c;
this.authenticationMethod = authnMethod;
}
public final String getAuthenticationMethod() {
return this.authenticationMethod;
}
public final String getCode() {
return this.code;
}
}