小编Yur*_*ias的帖子

如何在没有表格标签的情况下以html格式创建垂直单选按钮组

如何在html表单中创建垂直单选按钮组而不是水平按钮组?

我不想为此使用表格.有没有可用的属性/属性?

任何类型的帮助/建议将不胜感激,谢谢.

html

18
推荐指数
1
解决办法
3万
查看次数

使用Spring Security + CAS获得循环重定向,但应该正常工作

我正在尝试将基本应用程序从仅使用Spring Security更改为使用CAS,以启用SSO.但是我正在某个地方获得重定向循环,我无法找出问题所在.我已经做了两个其他模拟应用程序,并且CAS没有问题,因为它们正在工作.我正在使用Java配置代替XML配置,取自此处.我已经尝试了XML配置的例子,但我仍然得到相同的结果.我的猜测是对于authenticationManager的问题,它无法从Spring Security中检测到用户.该日志至少表示一个AnonymousUser并抛出AccessDeniedException.但它适用于其他两个具有相似配置的模拟应用程序(我甚至尝试过复制它,但错误仍然存​​在).我一直试图解决这个问题几天没有成功,所以任何帮助都表示赞赏.我在Windows 8上使用Tomcat 8,Spring 4.2和Ja-sig CAS 4.0.0.

我的WebSecurityConfig:

@Configuration
@EnableWebSecurity
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
    @Autowired
    private DataSource dataSource;

    @Autowired
    @Resource(name="CASuserDetailsService")
    private AuthenticationUserDetailsService userDetailsService;

    @Bean
    public ServiceProperties serviceProperties() {
        ServiceProperties serviceProperties = new ServiceProperties();
        serviceProperties.setService("https://localhost:8443/i9t-YM/j_spring_cas_security_check");
        serviceProperties.setSendRenew(false);
        return serviceProperties;
    }

    @Bean
    public CasAuthenticationProvider casAuthenticationProvider() {
        CasAuthenticationProvider casAuthenticationProvider = new CasAuthenticationProvider();
        casAuthenticationProvider.setAuthenticationUserDetailsService(authenticationUserDetailsService());
        casAuthenticationProvider.setServiceProperties(serviceProperties());
        casAuthenticationProvider.setTicketValidator(cas20ServiceTicketValidator());
        casAuthenticationProvider.setKey("some_id_for_this_cas_prov");
        return casAuthenticationProvider;
    }

    @Bean
    public AuthenticationUserDetailsService authenticationUserDetailsService() {
        return userDetailsService;
    }

    @Bean
    public Cas20ServiceTicketValidator cas20ServiceTicketValidator() {
        return new Cas20ServiceTicketValidator("https://localhost:8443/cas");
    }

    @Bean
    public CasAuthenticationFilter …
Run Code Online (Sandbox Code Playgroud)

java spring cas spring-security spring-4

6
推荐指数
1
解决办法
3256
查看次数

标签 统计

cas ×1

html ×1

java ×1

spring ×1

spring-4 ×1

spring-security ×1