forked from kidgrow-microservices-platform

zhaoxiaohao
2020-08-10 34fd8233bab7c8a00211644579942086deea722f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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);
    }
}