Class LocalCachingAuthenticator

  • All Implemented Interfaces:
    Authenticator

    public class LocalCachingAuthenticator
    extends InitializableObject
    implements Authenticator
    An authenticator that caches the result of an authentication event locally. The authentication is delegated to a pluggable component. Add the guava dependency to use this class.
    Since:
    1.8
    Author:
    Misagh Moayyed
    • Field Detail

      • logger

        protected final org.slf4j.Logger logger
    • Constructor Detail

      • LocalCachingAuthenticator

        public LocalCachingAuthenticator()
      • LocalCachingAuthenticator

        public LocalCachingAuthenticator​(Authenticator delegate,
                                         int cacheSize,
                                         int timeout,
                                         java.util.concurrent.TimeUnit timeUnit)
    • Method Detail

      • removeFromCache

        public void removeFromCache​(Credentials credentials)
      • isCached

        public boolean isCached​(Credentials credentials)
      • setDelegate

        public void setDelegate​(Authenticator delegate)
      • getCacheSize

        public int getCacheSize()
      • setCacheSize

        public void setCacheSize​(int cacheSize)
      • getTimeout

        public int getTimeout()
      • setTimeout

        public void setTimeout​(int timeout)
      • getTimeUnit

        public java.util.concurrent.TimeUnit getTimeUnit()
      • setTimeUnit

        public void setTimeUnit​(java.util.concurrent.TimeUnit timeUnit)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object