Java wicket身份验证角色和spring security cas客户端之间的身份验证集成问题

Java wicket身份验证角色和spring security cas客户端之间的身份验证集成问题,java,spring-security,wicket-1.5,Java,Spring Security,Wicket 1.5,我的一个Wicket项目有问题。 我使用的wicket版本是1.5.7版本,具有wicket auth角色(相同版本) 我正在尝试实现CAS服务器集成;为此,我尝试使用SpringSecurityCAS客户端(3.0.7.RELEASE),但cas身份验证根本不起作用。在这个项目中,我已经在使用SpringSecurityCore(3.1.0.RELEASE)、SpringSecurityConfig和SpringSecurityLDAP,并且运行良好 我遇到的问题是当我第一次访问Wicket页

我的一个Wicket项目有问题。 我使用的wicket版本是1.5.7版本,具有wicket auth角色(相同版本)

我正在尝试实现CAS服务器集成;为此,我尝试使用SpringSecurityCAS客户端(3.0.7.RELEASE),但cas身份验证根本不起作用。在这个项目中,我已经在使用SpringSecurityCore(3.1.0.RELEASE)、SpringSecurityConfig和SpringSecurityLDAP,并且运行良好

我遇到的问题是当我第一次访问Wicket页面时。通常我必须接受CAS审问;但是,尽管如此,我的自定义authenticatedWebApplication的方法“getSignInPageClass”(wicket auth角色)被调用,我被自动转发到我的登录页面(我根本没有收到任何CAS调用)


有人遇到过这种问题吗?

我也遇到过同样的问题。为了让它工作,我让Wicket重定向到CAS,然后CasAuthenticationFilter验证令牌并处理身份验证。我不知道这是否是最好的解决方案,但我使用了RequestMapper来处理AuthenticatedWebSession登录

Spring安全配置

<!-- https://cwiki.apache.org/WICKET/spring-security-and-wicket-auth-roles.html -->
<http use-expressions="true" auto-config="true" entry-point-ref="casEntryPoint">
    <intercept-url pattern="/**" />

    <custom-filter ref="casFilter" position="CAS_FILTER"/>
</http>
制作IRequestMapper以处理AuthenticatedWebSession登录和重定向

@Override
public IRequestHandler mapRequest(Request request) {
    logger.info("CasAuthMapper mapping {}", request.getUrl());
    // The authentication will have been handled by Spring's CasAuthenticationFilter
    Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
    // ... Do whatever you need to do here. I added a simple method to my web session to delegate to signIn(boolean).

我刚刚经历了同样的问题。为了让它工作,我让Wicket重定向到CAS,然后CasAuthenticationFilter验证令牌并处理身份验证。我不知道这是否是最好的解决方案,但我使用了RequestMapper来处理AuthenticatedWebSession登录

Spring安全配置

<!-- https://cwiki.apache.org/WICKET/spring-security-and-wicket-auth-roles.html -->
<http use-expressions="true" auto-config="true" entry-point-ref="casEntryPoint">
    <intercept-url pattern="/**" />

    <custom-filter ref="casFilter" position="CAS_FILTER"/>
</http>
制作IRequestMapper以处理AuthenticatedWebSession登录和重定向

@Override
public IRequestHandler mapRequest(Request request) {
    logger.info("CasAuthMapper mapping {}", request.getUrl());
    // The authentication will have been handled by Spring's CasAuthenticationFilter
    Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
    // ... Do whatever you need to do here. I added a simple method to my web session to delegate to signIn(boolean).