Class DefaultUnsuccessfulAuthenticationCounter
- java.lang.Object
-
- pl.edu.icm.unity.engine.api.authn.DefaultUnsuccessfulAuthenticationCounter
-
- All Implemented Interfaces:
UnsuccessfulAuthenticationCounter
public class DefaultUnsuccessfulAuthenticationCounter extends Object implements UnsuccessfulAuthenticationCounter
Counts unsuccessful authentication attempts per client's IP address. Configured with maximum number of attempts. Signals if the access should be blocked. Thread safe.- Author:
- K. Benedyczak
-
-
Constructor Summary
Constructors Constructor Description DefaultUnsuccessfulAuthenticationCounter(int maxAttepts, long blockTime)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getRemainingBlockedTime(String ip)
void
successfulAttempt(String ip)
void
unsuccessfulAttempt(String ip)
-
-
-
Method Detail
-
getRemainingBlockedTime
public long getRemainingBlockedTime(String ip)
- Specified by:
getRemainingBlockedTime
in interfaceUnsuccessfulAuthenticationCounter
-
unsuccessfulAttempt
public void unsuccessfulAttempt(String ip)
- Specified by:
unsuccessfulAttempt
in interfaceUnsuccessfulAuthenticationCounter
-
successfulAttempt
public void successfulAttempt(String ip)
- Specified by:
successfulAttempt
in interfaceUnsuccessfulAuthenticationCounter
-
-