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 longgetRemainingBlockedTime(String ip)voidsuccessfulAttempt(String ip)voidunsuccessfulAttempt(String ip)
-
-
-
Method Detail
-
getRemainingBlockedTime
public long getRemainingBlockedTime(String ip)
- Specified by:
getRemainingBlockedTimein interfaceUnsuccessfulAuthenticationCounter
-
unsuccessfulAttempt
public void unsuccessfulAttempt(String ip)
- Specified by:
unsuccessfulAttemptin interfaceUnsuccessfulAuthenticationCounter
-
successfulAttempt
public void successfulAttempt(String ip)
- Specified by:
successfulAttemptin interfaceUnsuccessfulAuthenticationCounter
-
-