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

net.unicon.cas.mfa.authentication.RequestedAuthenticationMethodRankingStrategy 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.authentication;

import net.unicon.cas.mfa.web.support.MultiFactorAuthenticationSupportingWebApplicationService;

import java.util.Set;

/**
 * Strategy interface for ranking requested authentication methods.
 *
 * @author Dmitriy Kopylenko
 * @author Unicon inc.
 */
public interface RequestedAuthenticationMethodRankingStrategy {

    /**
     * Calculates the highest ranking possible authentication method from the list of the requested ones.
     *
     * @param mfaTransaction mfa transaction encapsulating possible requested authentication methods
     *
     * @return mfa service representing the highest possible ranking authentication method or null
     * if implementations are unable to perform such calculation
     */
    MultiFactorAuthenticationSupportingWebApplicationService computeHighestRankingAuthenticationMethod(
            MultiFactorAuthenticationTransactionContext mfaTransaction);

    /**
     * Determine if provided list of previously achieved authentication methods contains any one method stronger than
     * currently requested one. The algorithm and configuration of the ranking strength of the authentication methods
     * should be provided by implementations.
     *
     * @param previouslyAchievedAuthenticationMethods set of previously achieved authentication methods
     * @param requestedAuthenticationMethod requestedAuthenticationMethod
     *
     * @return true if list contains any methods stronger than requested one, and false otherwise
     */
    boolean anyPreviouslyAchievedAuthenticationMethodsStrongerThanRequestedOne(Set previouslyAchievedAuthenticationMethods,
                                                                               String requestedAuthenticationMethod);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy