public abstract class BaseAuthenticationRequestRiskCalculator extends java.lang.Object implements AuthenticationRequestRiskCalculator
Modifier and Type | Field and Description |
---|---|
protected CasEventRepository |
casEventRepository
CAS event repository instance.
|
HIGHEST_RISK_SCORE, LOWEST_RISK_SCORE
Constructor and Description |
---|
BaseAuthenticationRequestRiskCalculator(CasEventRepository casEventRepository) |
Modifier and Type | Method and Description |
---|---|
AuthenticationRiskScore |
calculate(Authentication authentication,
RegisteredService service,
javax.servlet.http.HttpServletRequest request)
Calculate authentication risk score.
|
protected java.math.BigDecimal |
calculateScore(javax.servlet.http.HttpServletRequest request,
Authentication authentication,
RegisteredService service,
java.util.Collection<CasEvent> events)
Calculate score authentication risk score.
|
protected java.util.Collection<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.
|
protected CasEventRepository casEventRepository
public BaseAuthenticationRequestRiskCalculator(CasEventRepository casEventRepository)
public final AuthenticationRiskScore calculate(Authentication authentication, RegisteredService service, javax.servlet.http.HttpServletRequest request)
AuthenticationRequestRiskCalculator
calculate
in interface AuthenticationRequestRiskCalculator
authentication
- the authenticationservice
- the servicerequest
- the requestprotected java.math.BigDecimal calculateScore(javax.servlet.http.HttpServletRequest request, Authentication authentication, RegisteredService service, java.util.Collection<CasEvent> events)
request
- the requestauthentication
- the authenticationservice
- the serviceevents
- the eventsprotected java.util.Collection<CasEvent> getCasTicketGrantingTicketCreatedEventsFor(java.lang.String principal)
principal
- the principalprotected java.math.BigDecimal getFinalAveragedScore(long eventCount, long total)
eventCount
- the event counttotal
- the total