Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Wrong redirect after login to confluene homepage in stead of my app (using crowd)

Roel Croonenberghs March 20, 2012

I have confluence, jira and my own developed jsf application connected to crowd. This enabled SSO over the three applications.

When not logged in and requesting a url deep inside confluence, I get redirected to the confluence login page. I do the login and I get redirected to the previously demanded page. This is good.

But when I call a url from my own developed application (and I'm not logged in) I get redirected to the confluence login page (thsi is correct) but afterwards I get redirected to the confluence home page in stead of the page (my app) I initially requested.

How can I get the same behaviour in my own app?

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Andrew Frayling
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 20, 2012

Hi Roel,

Your app needs to pass the URL of the page the user was trying to get to as a parameter to the Confluence login URL. E.g.

If a user clicked on a link to <Confluence URL>/display/ds/Plugins+for+Intranets and was not logged in, the URL they are directed to is <Confluence URL>/login.action?os_destination=%2Fdisplay%2Fds%2FPlugins%2Bfor%2BIntranets

The os_destination parameter tells Confluence which page the user was trying to access so that it can forward the user to that page after they have successfully logged in.

Hope that helps?

Andrew.

Roel Croonenberghs March 20, 2012

Hi, That was a quick answer. Problem here is that crowd is redirecting it. Not my app. It is defined in crowd.properties application.login.url

In my app I use the VerifyTokenFilter. This is seeing if I'm already logged in and if nit redirects to the url defined in crowd properties.

I don't know how I can append os_destination to that url.

Andrew Frayling
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 20, 2012

Crowd is a bit beyond my knowledge, but there are some sites (http://docs.atlassian.com/atlassian-seraph/latest/configuration.html) that mention using os_destination=${originalurl} appended to the login URL for application.login.url in crowd.properties.

Not sure if this would work for you? If ${originalurl} is doing something clever like automatcally picking up the referrer URL it might.

Worth giving it a try?

Andrew.

Roel Croonenberghs March 20, 2012

Hi, I already tried that. But No luck. It doesnt get translated in the url. It stays ${originalurl}. And off course that is non meaning to confluence.

Andrew Frayling
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 20, 2012

Sorry, if that didn't work then that's beyond my knowledge of Crowd. It must be do-able though, hopefully someone with more experience of custom apps with Crowd can help.

TAGS
AUG Leaders

Atlassian Community Events