net.unicon.cas.mfa.web.support.UnrecognizedAuthenticationMethodException 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.web.support;
/**
* Thrown if an incoming authentication request specified an authentication
* method that is not supported and/or recognized by the MFA configuration.
* @author Misagh Moayyed
* @see net.unicon.cas.mfa.web.support.AbstractMultiFactorAuthenticationArgumentExtractor
*/
public class UnrecognizedAuthenticationMethodException extends RuntimeException {
private static final long serialVersionUID = -4141126343252978132L;
private final String authnMethod;
private final String service;
/**
* Spin up the exception instance with the requested authentication method.
* @param authnMethod the unsupported authentication method in the request
* @param service the service we are trying to log into
*/
public UnrecognizedAuthenticationMethodException(final String authnMethod, final String service) {
this.authnMethod = authnMethod;
this.service = service;
}
public final String getAuthenticationMethod() {
return this.authnMethod;
}
public final String getService() {
return this.service;
}
}