我正在使用基于Java的@配置使用Security构建一个应用程序。我们的JBoss EAP 6服务器配置了一个安全域,该域在jboss-web.xml-File中定义。
jboss-web.xml
<!DOCTYPE jboss-web PUBLIC
"-//JBoss//DTD Web Application 4.2//EN"
"http://www.jboss.org/j2ee/dtd/jboss-web_4_2.dtd">
<jboss-web>
<security-domain>ldapcomponent</security-domain>
</jboss-web>有没有一种方法可以在我的Security中使用这个安全域?
Security配置
@Configuration
@EnableWebSecurity
@EnableGlobalMethodSecurity(securedEnabled = true)
public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
@Autowired
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
auth.?????
}
@Override
protected void configure(final HttpSecurity http) throws Exception {
http.authorizeRequests().anyRequest().authenticated()
.anyRequest().hasRole("my-required-role").and().httpBasic();
}
}发布于 2015-01-28 10:02:26
JBoss身份验证需要
org.springframework.security.web.authentication.preauth.PreAuthenticatedAuthenticationProvider该方法可以添加以下内容:
auth.authenticationProvider(...);此外还有一个
org.springframework.security.web.authentication.preauth.j2ee.J2eePreAuthenticatedProcessingFilter 应该注册。
https://stackoverflow.com/questions/28172056
复制相似问题