voidmat
voidmat

Reputation: 155

Spring Security logout success url to another host

is that possible to make Spring Security 3.2.7.RELEASE redirect user to another host after logout? I can't force it to use another host. I'm using some kind of SSO access system and that might be a problem.

Example: My app is started on http://myAppUrl:8080/webapp1/
Users access it through http://ssoAccess:80/webapp1/ and that leads to real url, but in browser i still see ssoAccess url all the time (like some kind of proxy)

I want to make logout button from http://myAppUrl:8080/webapp1/logout.xhtml
to logout then redirect to http://ssoAccess:80/appList

When logout-success-url is set to "http://ssoAccess:80/appList" it redirects to http://ssoAccess:80/webapp1/http://ssoAccess:80/appList which is obviously not correct url returning 404.

I tried logout-success-handler as well, but still same problem. I also tried to make @Controller that has method returning "redirect:http://ssoAccess:80/appList" on endpoint that is pointed by logout-success-url. Still no luck.

I'm also using JSF.

Please help!

Upvotes: 0

Views: 360

Answers (1)

Mohsen
Mohsen

Reputation: 4643

A simple trick is that you create a logout.xhtml page in webapp1 that redirect's to appList.

logout.xhtml:

<script language="javascript">
    window.location.href = "http://ssoAccess:80/appList"
</script>

Upvotes: 1

Related Questions