Skip to content

SEC-1745: Saved request lost across session timeout #1981

@spring-projects-issues

Description

@spring-projects-issues

Drew Mazurek (Migrated from SEC-1745) said:

Using the SavedRequestAwareAuthenticationSuccessHandler configured as below, if the user's servlet session times out, after reauthentication Spring Security does not redirect the user to the URL he was trying to access. It instead sends him to the defaultTargetUrl.

<form-login login-page="/login" authentication-success-handler-ref="savedRequestAwareAuthenticationHandler" 
    authentication-failure-url="/login?authFailed=true"/>

<beans:bean id="savedRequestAwareAuthenticationHandler" class="org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler">
    <beans:property name="defaultTargetUrl" value="/start" />
    <beans:property name="targetUrlParameter" value="target" />
</beans:bean>

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: coreAn issue in spring-security-corestatus: declinedA suggestion or change that we don't feel we should currently applytype: bugA general bugtype: jiraAn issue that was migrated from JIRA

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions