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<br>
|
*
|
* @Description: 认证服务器令牌采用Redis令牌存储<br>
|
* @Project: <br>
|
* @CreateDate: Created in 2020/2/13 11:23 <br>
|
* @Author: <a href="4345453@kidgrow.com">liuke</a>
|
*/
|
public class AuthRedisTokenStore {
|
@Autowired
|
private RedisConnectionFactory connectionFactory;
|
|
@Autowired
|
private SecurityProperties securityProperties;
|
|
@Bean
|
public TokenStore tokenStore() {
|
return new CustomRedisTokenStore(connectionFactory, securityProperties);
|
}
|
}
|