Interface NonceCache
- All Known Implementing Classes:
MemoryNonceCache
public interface NonceCache
Nonce缓存接口
用于存储已使用的nonce,防止重放攻击
实现类:
1. MemoryNonceCache:框架内置的内存实现,适用于单节点部署(默认)
2. 分布式实现:多副本部署由业务方实现本接口(如基于 Redis 的原子操作)并注册为 Bean,
框架的 @ConditionalOnMissingBean 内存实现会自动让位;框架不内置任何分布式缓存模块。
- Author:
- Kerbores(kerbores@riemann.tech)
-
Method Summary
Modifier and TypeMethodDescriptionbooleansetIfAbsent(String nonce, String value, long expireSeconds) 如果nonce不存在则设置
-
Method Details
-
setIfAbsent
-