org.springframework.security.oauth2.provider.token.store.redis.StandardStringSerializationStrategy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-security-oauth2 Show documentation
Show all versions of spring-security-oauth2 Show documentation
Module for providing OAuth2 support to Spring Security
package org.springframework.security.oauth2.provider.token.store.redis;
import org.springframework.data.redis.serializer.StringRedisSerializer;
/**
* Serializes Strings using {@link StringRedisSerializer}
*
*
* @deprecated See the OAuth 2.0 Migration Guide for Spring Security 5.
*
* @author efenderbosch
*
*/
@Deprecated
public abstract class StandardStringSerializationStrategy extends BaseRedisTokenStoreSerializationStrategy {
private static final StringRedisSerializer STRING_SERIALIZER = new StringRedisSerializer();
@Override
protected String deserializeStringInternal(byte[] bytes) {
return STRING_SERIALIZER.deserialize(bytes);
}
@Override
protected byte[] serializeInternal(String string) {
return STRING_SERIALIZER.serialize(string);
}
}