package com.kidgrow.authclient.store;
import com.kidgrow.authclient.properties.SecurityProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.security.oauth2.provider.token.TokenStore;
/**
* 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020
*
* @Description: 认证服务器令牌采用Redis令牌存储
* @Project:
* @CreateDate: Created in 2020/2/13 11:23
* @Author: liuke
*/
public class AuthRedisTokenStore {
@Autowired
private RedisConnectionFactory connectionFactory;
@Autowired
private SecurityProperties securityProperties;
@Bean
public TokenStore tokenStore() {
return new CustomRedisTokenStore(connectionFactory, securityProperties);
}
}