sandortibor / mahara-shibboleth-server-authentication

Automatically exported from code.google.com/p/mahara-shibboleth-server-authentication
0 stars 0 forks source link

Shibboleth login doesn't redirect you back to the page you requested before login #3

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
This bug is analogous to one we just fixed for the Persona auth plugin: 
https://bugs.launchpad.net/mahara/+bug/1331319

To replicate:

1. Set up a Mahara site with the Shibboleth plugin
2. Create a portfolio page in the site, which is not accessible to logged-out 
users
3. Log out of the site
4. Try to navigate to your page by its URL
5. You'll see the "transient login page", prompting you to log in.
6. Log in via Shibboleth

Expected result: After shibboleth login is complete, you should be redirected 
to the page you requested. (This is how the author Mahara auth methods work)

Actual result: After shibboleth login, you are redirected to your dashboard

I recently implemented a fix for this issue for SWITCH. The fix is basically to 
append a Mahara "return URL" to the return URL we send to Shibboleth, and then 
alter login_manager.class.php to look for and use that Mahara return URL. I 
also added a sesskey to the return URL for security purposes.

I've attached a couple of patch files that illustrate how I did this. One is a 
patch for login_manager.class.php, and the other is a patch that shows how I 
altered the "login.tpl" files to include the necessary returnurl and sesskey 
values.

Original issue reported on code.google.com by aaronwells on 27 Jun 2014 at 1:40

Attachments:

GoogleCodeExporter commented 8 years ago
Whoops, noticed a typo in the login.tpl.patch file. Here's a corrected version 
of it.

Original comment by aaronwells on 27 Jun 2014 at 1:54

Attachments: