Class BaseAuthenticationRequestRiskCalculator

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      AuthenticationRiskScore calculate​(org.apereo.cas.authentication.Authentication authentication, org.apereo.cas.services.RegisteredService service, javax.servlet.http.HttpServletRequest request)
      Calculate authentication risk score.
      protected java.math.BigDecimal calculateScore​(javax.servlet.http.HttpServletRequest request, org.apereo.cas.authentication.Authentication authentication, org.apereo.cas.services.RegisteredService service, java.util.Collection<? extends org.apereo.cas.support.events.dao.CasEvent> events)
      Calculate score authentication risk score.
      protected java.math.BigDecimal calculateScoreBasedOnEventsCount​(org.apereo.cas.authentication.Authentication authentication, java.util.Collection<? extends org.apereo.cas.support.events.dao.CasEvent> events, long count)
      Calculate score based on events count big decimal.
      protected java.util.Collection<? extends org.apereo.cas.support.events.dao.CasEvent> getCasTicketGrantingTicketCreatedEventsFor​(java.lang.String principal)
      Gets cas ticket granting ticket created events.
      protected java.math.BigDecimal getFinalAveragedScore​(long eventCount, long total)
      Gets final averaged score.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • casEventRepository

        protected final org.apereo.cas.support.events.CasEventRepository casEventRepository
        CAS event repository instance.
      • casProperties

        protected final org.apereo.cas.configuration.CasConfigurationProperties casProperties
        CAS settings.
    • Constructor Detail

      • BaseAuthenticationRequestRiskCalculator

        public BaseAuthenticationRequestRiskCalculator()
    • Method Detail

      • calculate

        public final AuthenticationRiskScore calculate​(org.apereo.cas.authentication.Authentication authentication,
                                                       org.apereo.cas.services.RegisteredService service,
                                                       javax.servlet.http.HttpServletRequest request)
        Description copied from interface: AuthenticationRequestRiskCalculator
        Calculate authentication risk score.
        Specified by:
        calculate in interface AuthenticationRequestRiskCalculator
        Parameters:
        authentication - the authentication
        service - the service
        request - the request
        Returns:
        the authentication risk score
      • calculateScore

        protected java.math.BigDecimal calculateScore​(javax.servlet.http.HttpServletRequest request,
                                                      org.apereo.cas.authentication.Authentication authentication,
                                                      org.apereo.cas.services.RegisteredService service,
                                                      java.util.Collection<? extends org.apereo.cas.support.events.dao.CasEvent> events)
        Calculate score authentication risk score.
        Parameters:
        request - the request
        authentication - the authentication
        service - the service
        events - the events
        Returns:
        the authentication risk score
      • getCasTicketGrantingTicketCreatedEventsFor

        protected java.util.Collection<? extends org.apereo.cas.support.events.dao.CasEvent> getCasTicketGrantingTicketCreatedEventsFor​(java.lang.String principal)
        Gets cas ticket granting ticket created events.
        Parameters:
        principal - the principal
        Returns:
        the cas ticket granting ticket created events for
      • calculateScoreBasedOnEventsCount

        protected java.math.BigDecimal calculateScoreBasedOnEventsCount​(org.apereo.cas.authentication.Authentication authentication,
                                                                        java.util.Collection<? extends org.apereo.cas.support.events.dao.CasEvent> events,
                                                                        long count)
        Calculate score based on events count big decimal.
        Parameters:
        authentication - the authentication
        events - the events
        count - the count
        Returns:
        the big decimal
      • getFinalAveragedScore

        protected java.math.BigDecimal getFinalAveragedScore​(long eventCount,
                                                             long total)
        Gets final averaged score.
        Parameters:
        eventCount - the event count
        total - the total
        Returns:
        the final averaged score