package com.sptg.gateway.cfgbeans;

import com.sptg.common.security.interceptor.SecurityInterceptor;
import com.sptg.common.security.service.SecurityServiceInterface;
import com.sptg.permissions.api.entity.DeviceAdminUser;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

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

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

}
