Class GuavaAuthenticationCache
- java.lang.Object
-
- org.craftercms.security.authentication.impl.GuavaAuthenticationCache
-
- All Implemented Interfaces:
AuthenticationCache
public class GuavaAuthenticationCache extends Object implements AuthenticationCache
Implementation ofAuthenticationCachethat uses a GuavaCache.- Since:
- 4.0.0
- Author:
- avasquez, joseross
-
-
Field Summary
Fields Modifier and Type Field Description protected com.google.common.cache.Cache<String,Authentication>cache
-
Constructor Summary
Constructors Constructor Description GuavaAuthenticationCache(com.google.common.cache.Cache<String,Authentication> cache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthenticationgetAuthentication(String ticket)Returns the cached authentication for the given ticket.voidputAuthentication(Authentication authentication)Puts the specified authentication in the cache.voidremoveAuthentication(String ticket)Removes the authentication associated to the given ticket from the cache.
-
-
-
Field Detail
-
cache
protected com.google.common.cache.Cache<String,Authentication> cache
-
-
Constructor Detail
-
GuavaAuthenticationCache
@ConstructorProperties("cache") public GuavaAuthenticationCache(com.google.common.cache.Cache<String,Authentication> cache)
-
-
Method Detail
-
getAuthentication
public Authentication getAuthentication(String ticket)
Description copied from interface:AuthenticationCacheReturns the cached authentication for the given ticket.- Specified by:
getAuthenticationin interfaceAuthenticationCache
-
putAuthentication
public void putAuthentication(Authentication authentication)
Description copied from interface:AuthenticationCachePuts the specified authentication in the cache.- Specified by:
putAuthenticationin interfaceAuthenticationCache
-
removeAuthentication
public void removeAuthentication(String ticket)
Description copied from interface:AuthenticationCacheRemoves the authentication associated to the given ticket from the cache.- Specified by:
removeAuthenticationin interfaceAuthenticationCache
-
-