net.unicon.cas.mfa.authentication.AuthenticationMethodTranslator 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.authentication;
import org.jasig.cas.authentication.principal.WebApplicationService;
/**
* Defines operations that are to translate a received/retrieved authentication method
* into one that CAS can recognize. This is useful in cases where principal attributes
* have defined arbitrary names for the MFA trigger, or that service providers are unable
* to change submitted parameter names in the request to trigger MFA.
* @author Misagh Moayyed
*/
public interface AuthenticationMethodTranslator {
/**
* Translate an authentication method to one that CAS can recognize.
* Implementations may choose to decide what should happen if no mapping
* is found between the source and target authentication methods.
* @param targetService the target service
* @param receivedAuthenticationMethod the received authentication method
* @return the translated method name
*/
String translate(final WebApplicationService targetService, final String receivedAuthenticationMethod);
}