Class ReactiveRedisAccessTokenCache
- java.lang.Object
-
- org.bremersee.security.authentication.ReactiveRedisAccessTokenCache
-
- All Implemented Interfaces:
ReactiveAccessTokenCache
public class ReactiveRedisAccessTokenCache extends Object implements ReactiveAccessTokenCache
The reactive redis access token cache.- Author:
- Christian Bremer
-
-
Field Summary
-
Fields inherited from interface org.bremersee.security.authentication.ReactiveAccessTokenCache
CACHE_NAME
-
-
Constructor Summary
Constructors Constructor Description ReactiveRedisAccessTokenCache(AuthProperties.JwtCache jwtCacheProperties, org.springframework.data.redis.connection.ReactiveRedisConnectionFactory connectionFactory)
Instantiates a new reactive redis access token cache.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description reactor.core.publisher.Mono<String>
findAccessToken(String key)
Find not expired access token from cache.reactor.core.publisher.Mono<String>
putAccessToken(String key, String accessToken)
Put new access token into the cache.
-
-
-
Constructor Detail
-
ReactiveRedisAccessTokenCache
public ReactiveRedisAccessTokenCache(AuthProperties.JwtCache jwtCacheProperties, org.springframework.data.redis.connection.ReactiveRedisConnectionFactory connectionFactory)
Instantiates a new reactive redis access token cache.- Parameters:
jwtCacheProperties
- the jwt cache propertiesconnectionFactory
- the connection factory
-
-
Method Detail
-
findAccessToken
public reactor.core.publisher.Mono<String> findAccessToken(String key)
Description copied from interface:ReactiveAccessTokenCache
Find not expired access token from cache.- Specified by:
findAccessToken
in interfaceReactiveAccessTokenCache
- Parameters:
key
- the key- Returns:
- the access token
-
putAccessToken
public reactor.core.publisher.Mono<String> putAccessToken(String key, String accessToken)
Description copied from interface:ReactiveAccessTokenCache
Put new access token into the cache.- Specified by:
putAccessToken
in interfaceReactiveAccessTokenCache
- Parameters:
key
- the keyaccessToken
- the access token- Returns:
- the access token
-
-