✨ Introducing new features. #1958 OAuth2.0 RedisTokenStore 支持 Jackson 序列化
This commit is contained in:
1 parent
086be8e55b
commit
3965327004
2 files changed
+8
-1
No files matched your search
+5
@@ -215,4 +215,9 @@ public interface SecurityConstants {
|
||||
*/
|
||||
String AES = "aes";
|
||||
|
||||
/**
|
||||
* 是否开启 redis json 格式化
|
||||
*/
|
||||
boolean JSON_FORMAT = false;
|
||||
|
||||
}
|
||||
+3
-1
@@ -29,7 +29,9 @@ public class PigxTokenStoreAutoConfiguration {
|
||||
@Bean
|
||||
public TokenStore tokenStore() {
|
||||
PigxRedisTokenStore tokenStore = new PigxRedisTokenStore(connectionFactory, resolver);
|
||||
tokenStore.setSerializationStrategy(new JacksonRedisTokenStoreSerializationStrategy());
|
||||
if (SecurityConstants.JSON_FORMAT) {
|
||||
tokenStore.setSerializationStrategy(new JacksonRedisTokenStoreSerializationStrategy());
|
||||
}
|
||||
tokenStore.setPrefix(SecurityConstants.PIGX_PREFIX + SecurityConstants.OAUTH_PREFIX);
|
||||
tokenStore.setAuthenticationKeyGenerator(new DefaultAuthenticationKeyGenerator() {
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user