package com.sptg.gateway.cfgbeans;

import com.sptg.common.core.beans.UserBean;
import com.sptg.common.security.interceptor.SecurityInterceptor;
import com.sptg.common.security.service.SecurityServiceInterface;
import com.sptg.common.security.service.impl.BaseRedisSecurityService;
import com.sptg.gateway.security.SecurityServiceImpl;
import com.sptg.permissions.api.entity.Account;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.RedisTemplate;

/**
 * title: SecurityConfigBean
 * package: com.sptg.gateway.cfgbeans
 * description: 安全配置
 *
 *                  
 *                 
 */
@Configuration
public class SecurityConfigBean {

    /**
     * 功能描述: 权限拦截器
     * @param securityServiceInterface 权限接口
     * @return SecurityInterceptor<Account>
     *                  
     *                       
     */
    @Bean
    public SecurityInterceptor<Account> securityAspect(SecurityServiceInterface<Account> securityServiceInterface){
        return new SecurityInterceptor<>(securityServiceInterface);
    }

}
