Class BaseMultifactorAuthenticationProviderBypassEvaluator

    • Field Summary

      • Fields inherited from interface org.apereo.cas.authentication.bypass.MultifactorAuthenticationProviderBypassEvaluator

        AUTHENTICATION_ATTRIBUTE_BYPASS_MFA, AUTHENTICATION_ATTRIBUTE_BYPASS_MFA_PROVIDER
      • Fields inherited from interface org.springframework.core.Ordered

        HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Optional<org.apereo.cas.authentication.bypass.MultifactorAuthenticationProviderBypassEvaluator> belongsToMultifactorAuthenticationProvider​(java.lang.String providerId)  
      void forgetBypass​(org.apereo.cas.authentication.Authentication authentication)  
      boolean isMultifactorAuthenticationBypassed​(org.apereo.cas.authentication.Authentication authentication, java.lang.String requestedContext)  
      protected static boolean locateMatchingAttributeValue​(java.lang.String attrName, java.lang.String attrValue, java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> attributes)
      Locate matching attribute value boolean.
      protected static boolean locateMatchingAttributeValue​(java.lang.String attrName, java.lang.String attrValue, java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> attributes, boolean matchIfNoValueProvided)
      Evaluate attribute rules for bypass.
      void rememberBypass​(org.apereo.cas.authentication.Authentication authentication, org.apereo.cas.authentication.MultifactorAuthenticationProvider provider)  
      protected org.apereo.cas.authentication.principal.Principal resolvePrincipal​(org.apereo.cas.authentication.principal.Principal principal)
      Resolve principal.
      boolean shouldMultifactorAuthenticationProviderExecute​(org.apereo.cas.authentication.Authentication authentication, org.apereo.cas.services.RegisteredService registeredService, org.apereo.cas.authentication.MultifactorAuthenticationProvider provider, javax.servlet.http.HttpServletRequest request)  
      protected abstract boolean shouldMultifactorAuthenticationProviderExecuteInternal​(org.apereo.cas.authentication.Authentication authentication, org.apereo.cas.services.RegisteredService registeredService, org.apereo.cas.authentication.MultifactorAuthenticationProvider provider, javax.servlet.http.HttpServletRequest request)
      Should multifactor authentication provider execute internal.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apereo.cas.authentication.bypass.MultifactorAuthenticationProviderBypassEvaluator

        getId, getOrder, getProviderId, isEmpty, size
    • Constructor Detail

      • BaseMultifactorAuthenticationProviderBypassEvaluator

        public BaseMultifactorAuthenticationProviderBypassEvaluator()
    • Method Detail

      • forgetBypass

        public void forgetBypass​(org.apereo.cas.authentication.Authentication authentication)
        Specified by:
        forgetBypass in interface org.apereo.cas.authentication.bypass.MultifactorAuthenticationProviderBypassEvaluator
      • isMultifactorAuthenticationBypassed

        public boolean isMultifactorAuthenticationBypassed​(org.apereo.cas.authentication.Authentication authentication,
                                                           java.lang.String requestedContext)
        Specified by:
        isMultifactorAuthenticationBypassed in interface org.apereo.cas.authentication.bypass.MultifactorAuthenticationProviderBypassEvaluator
      • rememberBypass

        public void rememberBypass​(org.apereo.cas.authentication.Authentication authentication,
                                   org.apereo.cas.authentication.MultifactorAuthenticationProvider provider)
        Specified by:
        rememberBypass in interface org.apereo.cas.authentication.bypass.MultifactorAuthenticationProviderBypassEvaluator
      • belongsToMultifactorAuthenticationProvider

        public java.util.Optional<org.apereo.cas.authentication.bypass.MultifactorAuthenticationProviderBypassEvaluator> belongsToMultifactorAuthenticationProvider​(java.lang.String providerId)
        Specified by:
        belongsToMultifactorAuthenticationProvider in interface org.apereo.cas.authentication.bypass.MultifactorAuthenticationProviderBypassEvaluator
      • shouldMultifactorAuthenticationProviderExecute

        public boolean shouldMultifactorAuthenticationProviderExecute​(org.apereo.cas.authentication.Authentication authentication,
                                                                      org.apereo.cas.services.RegisteredService registeredService,
                                                                      org.apereo.cas.authentication.MultifactorAuthenticationProvider provider,
                                                                      javax.servlet.http.HttpServletRequest request)
        Specified by:
        shouldMultifactorAuthenticationProviderExecute in interface org.apereo.cas.authentication.bypass.MultifactorAuthenticationProviderBypassEvaluator
      • shouldMultifactorAuthenticationProviderExecuteInternal

        protected abstract boolean shouldMultifactorAuthenticationProviderExecuteInternal​(org.apereo.cas.authentication.Authentication authentication,
                                                                                          org.apereo.cas.services.RegisteredService registeredService,
                                                                                          org.apereo.cas.authentication.MultifactorAuthenticationProvider provider,
                                                                                          javax.servlet.http.HttpServletRequest request)
        Should multifactor authentication provider execute internal.
        Parameters:
        authentication - the authentication
        registeredService - the registered service
        provider - the provider
        request - the request
        Returns:
        true/false
      • locateMatchingAttributeValue

        protected static boolean locateMatchingAttributeValue​(java.lang.String attrName,
                                                              java.lang.String attrValue,
                                                              java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> attributes)
        Locate matching attribute value boolean.
        Parameters:
        attrName - the attr name
        attrValue - the attr value
        attributes - the attributes
        Returns:
        true/false
      • locateMatchingAttributeValue

        protected static boolean locateMatchingAttributeValue​(java.lang.String attrName,
                                                              java.lang.String attrValue,
                                                              java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> attributes,
                                                              boolean matchIfNoValueProvided)
        Evaluate attribute rules for bypass.
        Parameters:
        attrName - the attr name
        attrValue - the attr value
        attributes - the attributes
        matchIfNoValueProvided - the force match on value
        Returns:
        true a matching attribute name/value is found
      • resolvePrincipal

        protected org.apereo.cas.authentication.principal.Principal resolvePrincipal​(org.apereo.cas.authentication.principal.Principal principal)
        Resolve principal.
        Parameters:
        principal - the principal
        Returns:
        the principal