Package org.geoserver.security.auth

Examples of org.geoserver.security.auth.AuthenticationCacheEntry


            LOGGER.fine("AuthenticationCache adding new entry for " + filterName
                    + ", " + cacheKey);
            LOGGER.fine("Cache entries #: " + cache.size());
        }
        cache.put(new AuthenticationCacheKey(filterName, cacheKey),
                new AuthenticationCacheEntry(auth, timeToIdleSeconds,
                        timeToLiveSeconds));
        if (LOGGER.isLoggable(Level.FINE)) {
            LOGGER.fine("AuthenticationCache added new entry for " + filterName
                    + ", " + cacheKey);
            LOGGER.fine("Cache entries #: " + cache.size());
View Full Code Here


        }
    }
   
    @Override
    public Authentication get(String filterName, String cacheKey) {
        AuthenticationCacheEntry entry = cache
                .getIfPresent(new AuthenticationCacheKey(filterName, cacheKey));
        if (entry == null) {
            if (LOGGER.isLoggable(Level.FINE)) {
                LOGGER.fine("AuthenticationCache has no entry for " + filterName
                        + ", " + cacheKey);
            }
            return null;
        }
        long currentTime=System.currentTimeMillis();
        if(entry.hasExpired(currentTime)) {
            if (LOGGER.isLoggable(Level.FINE)) {
                LOGGER.fine("Entry has expired");
            }
            cache.invalidate(entry);
            return null;
        }
        entry.setLastAccessed(System.currentTimeMillis());
        if (LOGGER.isLoggable(Level.FINE)) {
            LOGGER.fine("AuthenticationCache found an entry for " + filterName
                    + ", " + cacheKey);
        }
        return entry.getAuthentication();
    }
View Full Code Here

TOP

Related Classes of org.geoserver.security.auth.AuthenticationCacheEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.