提交 3ccec3a6 编写于 作者: sq3536's avatar sq3536

bpmn

上级 9095a26c
......@@ -23,6 +23,7 @@ import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
import org.springframework.context.annotation.Profile;
import org.springframework.beans.factory.annotation.Qualifier;
@Profile("${app.getPKGCodeName()?lower_case}-prod")
@Configuration
......@@ -33,6 +34,9 @@ public class ${app.getPKGCodeName()}SecurityConfig extends WebSecurityConfigurer
private AuthenticationEntryPoint unauthorizedHandler;
@Autowired
<#if sys.getPSSystemSetting()?? && sys.getPSSystemSetting().getDataAccCtrlArch()?? && sys.getPSSystemSetting().getDataAccCtrlArch()==1>
@Qualifier("IBZUAAUserService")
</#if>
private AuthenticationUserService userDetailsService;
/**
......
......@@ -22,6 +22,7 @@ import org.springframework.security.config.http.SessionCreationPolicy;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
import org.springframework.beans.factory.annotation.Qualifier;
@Configuration
@EnableWebSecurity
......@@ -32,6 +33,9 @@ public class DevBootSecurityConfig extends WebSecurityConfigurerAdapter {
private AuthenticationEntryPoint unauthorizedHandler;
@Autowired
<#if sys.getPSSystemSetting()?? && sys.getPSSystemSetting().getDataAccCtrlArch()?? && sys.getPSSystemSetting().getDataAccCtrlArch()==1>
@Qualifier("IBZUAAUserService")
</#if>
private AuthenticationUserService userDetailsService;
/**
......
......@@ -23,6 +23,7 @@ import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
import org.springframework.context.annotation.Profile;
import org.springframework.beans.factory.annotation.Qualifier;
@Profile("${item.getCodeName()?lower_case}-prod")
@Configuration
......@@ -33,6 +34,9 @@ public class ${item.codeName}SecurityConfig extends WebSecurityConfigurerAdapter
private AuthenticationEntryPoint unauthorizedHandler;
@Autowired
<#if sys.getPSSystemSetting()?? && sys.getPSSystemSetting().getDataAccCtrlArch()?? && sys.getPSSystemSetting().getDataAccCtrlArch()==1>
@Qualifier("IBZUAAUserService")
</#if>
private AuthenticationUserService userDetailsService;
/**
......
......@@ -17,6 +17,7 @@ import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Qualifier;
@RestController
@RequestMapping("/")
......@@ -30,6 +31,9 @@ public class AuthenticationController
private AuthTokenUtil jwtTokenUtil;
@Autowired
<#if sys.getPSSystemSetting()?? && sys.getPSSystemSetting().getDataAccCtrlArch()?? && sys.getPSSystemSetting().getDataAccCtrlArch()==1>
@Qualifier("IBZUAAUserService")
</#if>
private AuthenticationUserService userDetailsService;
@PostMapping(value = ${r'"${ibiz.auth.path:v7/login}"'})
......
......@@ -14,6 +14,7 @@ import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.web.authentication.WebAuthenticationDetailsSource;
import org.springframework.stereotype.Component;
import org.springframework.web.filter.OncePerRequestFilter;
import org.springframework.beans.factory.annotation.Qualifier;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
......@@ -29,7 +30,7 @@ public class AuthorizationTokenFilter extends OncePerRequestFilter {
private final AuthTokenUtil authTokenUtil;
private final String tokenHeader;
public AuthorizationTokenFilter(AuthenticationUserService userDetailsService, AuthTokenUtil authTokenUtil, @Value(${r'"${ibiz.jwt.header:Authorization}"'}) String tokenHeader) {
public AuthorizationTokenFilter(<#if sys.getPSSystemSetting()?? && sys.getPSSystemSetting().getDataAccCtrlArch()?? && sys.getPSSystemSetting().getDataAccCtrlArch()==1>@Qualifier("IBZUAAUserService")</#if> AuthenticationUserService userDetailsService, AuthTokenUtil authTokenUtil, @Value(${r'"${ibiz.jwt.header:Authorization}"'}) String tokenHeader) {
this.userDetailsService = userDetailsService;
this.authTokenUtil = authTokenUtil;
this.tokenHeader = tokenHeader;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册