All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.unicon.cas.mfa.web.support.UnrecognizedAuthenticationMethodException Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 2.0.0-RC3
Show newest version
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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy