class AuthorisationMethodDecider {

    public boolean isExplicitMethod(boolean tppExplicitAuthorisationPreferred, boolean multilevelScaRequired) {
        boolean explicit = false;

        StartAuthorisationMode startAuthorisationMode = aspspProfileService.getStartAuthorisationMode();
        if (StartAuthorisationMode.AUTO.equals(startAuthorisationMode)) {
            explicit = multilevelScaRequired || isSigningBasketModeActive(tppExplicitAuthorisationPreferred);
        } else {
            explicit = StartAuthorisationMode.EXPLICIT.equals(startAuthorisationMode);
        }

        log.info("{} authorisation method chosen", explicit ? "EXPLICIT" : "IMPLICIT");
        return explicit;
    }

}