Class UnsuccessfulAuthenticationCounter


  • public class UnsuccessfulAuthenticationCounter
    extends java.lang.Object
    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 Detail

      • UnsuccessfulAuthenticationCounter

        public UnsuccessfulAuthenticationCounter​(int maxAttepts,
                                                 long blockTime)
    • Method Detail

      • getRemainingBlockedTime

        public long getRemainingBlockedTime​(java.lang.String ip)
      • unsuccessfulAttempt

        public void unsuccessfulAttempt​(java.lang.String ip)
      • successfulAttempt

        public void successfulAttempt​(java.lang.String ip)