Class GuavaAuthenticationCache
java.lang.Object
org.craftercms.security.authentication.impl.GuavaAuthenticationCache
- All Implemented Interfaces:
AuthenticationCache
Implementation of
AuthenticationCache
that uses a Guava Cache
.- Since:
- 4.0.0
- Author:
- avasquez, joseross
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGuavaAuthenticationCache
(com.google.common.cache.Cache<String, Authentication> cache) -
Method Summary
Modifier and TypeMethodDescriptiongetAuthentication
(String ticket) Returns the cached authentication for the given ticket.void
putAuthentication
(Authentication authentication) Puts the specified authentication in the cache.void
removeAuthentication
(String ticket) Removes the authentication associated to the given ticket from the cache.
-
Field Details
-
cache
-
-
Constructor Details
-
GuavaAuthenticationCache
@ConstructorProperties("cache") public GuavaAuthenticationCache(com.google.common.cache.Cache<String, Authentication> cache)
-
-
Method Details
-
getAuthentication
Description copied from interface:AuthenticationCache
Returns the cached authentication for the given ticket.- Specified by:
getAuthentication
in interfaceAuthenticationCache
-
putAuthentication
Description copied from interface:AuthenticationCache
Puts the specified authentication in the cache.- Specified by:
putAuthentication
in interfaceAuthenticationCache
-
removeAuthentication
Description copied from interface:AuthenticationCache
Removes the authentication associated to the given ticket from the cache.- Specified by:
removeAuthentication
in interfaceAuthenticationCache
-