0

I am doing Third party based authentication with Spring Authorization.

Now when the user clears the browser history and the session is null,My Pre Auth Filter returns Principal as null, now as the user clears history, I want to redirect the user to third party again for authentication, but it gets redirected to spring default authentication page, how can I redirect it to third party?

Phalguni Mukherjee
  • 623
  • 3
  • 11
  • 29

1 Answers1

1

It's possible to redirect to any page, including third party login pages not hosted by the application using the login-page attribute of form-login:

<security:http>
    <security:form-login login-page="http://www.thirdparty.com"/>
    ...
</security:http>
Angular University
  • 42,341
  • 15
  • 74
  • 81
  • @jadednessmy scenario is,if i clear browser cache it should be redirected to login page through spring security ,i used but it doesn't work – Phalguni Mukherjee Feb 09 '14 at 13:27
  • invalid-session-url is not the login page, that is the URL that is used to perform the logout action, see this answer http://stackoverflow.com/questions/2601013/spring-security-redirect-to-invalid-session-url-instead-of-logout-success-url-o. Did you try with login-page? it should work – Angular University Feb 10 '14 at 09:26