docs: @Override
      public Pair<Boolean, Optional<MultifactorAuthenticationProvider>> validate(final Authentication authentication,
                                                                                 final String requestedContext,
                                                                                 final RegisteredService service) {
          val attributes = authentication.getAttributes();
          val ctxAttr = attributes.get(this.authenticationContextAttribute);
          val contexts = CollectionUtils.toCollection(ctxAttr);
          LOGGER.trace("Attempting to match requested authentication context [{}] against [{}]", requestedContext, contexts);
          val providerMap = MultifactorAuthenticationUtils.getAvailableMultifactorAuthenticationProviders(this.applicationContext);
          LOGGER.trace("Available MFA providers are [{}]", providerMap.values());
          val requestedProvider = locateRequestedProvider(providerMap.values(), requestedContext);
          if (requestedProvider.isEmpty()) {
              LOGGER.debug("Requested authentication provider cannot be recognized.");
              return Pair.of(Boolean.FALSE, Optional.empty());
          }
          LOGGER.debug("Requested context is [{}] and available contexts are [{}]", requestedContext, contexts);
          if (contexts.stream().anyMatch(ctx -> ctx.toString().equals(requestedContext))) {
              LOGGER.debug("Requested authentication context [{}] is satisfied", requestedContext);
              return Pair.of(Boolean.TRUE, requestedProvider);
          }
          if (StringUtils.isNotBlank(this.mfaTrustedAuthnAttributeName) && attributes.containsKey(this.mfaTrustedAuthnAttributeName)) {
              LOGGER.debug("Requested authentication context [{}] is satisfied since device is already trusted", requestedContext);
              return Pair.of(Boolean.TRUE, requestedProvider);
          }
          val satisfiedProviders = getSatisfiedAuthenticationProviders(authentication, providerMap.values());
          if (satisfiedProviders != null && !satisfiedProviders.isEmpty()) {
              val providers = satisfiedProviders.toArray(MultifactorAuthenticationProvider[]::new);
              OrderComparator.sortIfNecessary(providers);
              val result = Arrays.stream(providers)
                  .filter(provider -> {
                      val p = requestedProvider.get();
                      return provider.equals(p) || provider.getOrder() >= p.getOrder();
                  })
                  .findFirst();
              if (result.isPresent()) {
                  LOGGER.debug("Current provider [{}] already satisfies the authentication requirements of [{}]; proceed with flow normally.",
                      result.get(), requestedProvider);
                  return Pair.of(Boolean.TRUE, requestedProvider);
              }
          }
          val provider = requestedProvider.get();
          LOGGER.debug("No multifactor providers could be located to satisfy the requested context for [{}]", provider);
          return Pair.of(Boolean.FALSE, requestedProvider);
      }