[
http://jira.dspace.org/jira/browse/DS-570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11745#action_11745
]
Kim Shepherd commented on DS-570:
---------------------------------
Copying my dspace-devel reply to JIRA comments:
-------------------
In theory, the "intercept and force login" way JSPUI does things should make it
easier for us to allow the request to continue afterwards, though the other
issue you touch on (a user is viewing an item, but wants to login and then be
redirected back to their start page) needs some thought, too...
To expand a bit on how the JSPUI currently works: (all: please correct me if
I'm wrong!)
In JSPUI's web.xml, we have "filter-mapping" entries as well as URL mapping
entries, which tell JSPUI which paths require particular filters (eg.
AdminOnlyFilter, RegisteredOnlyFilter). These filters intercept the request,
obtain context, start stackable auth, and allow the filter chain to proceed.
The authentication is handled by org.dspace.app.webui.util.Authenticate, which
is where things are currently going wrong (though I don't know why, without
closer inspection). It tries to store the original request in a session
attribute called "interrupted.request.url", and then retrieves it in
resumeInterruptedRequest(). If it can't find that original URL, it defaults to
"/mydspace".
As things stand, session.getAttribute("interrupted.request.uri") is *always*
null, so the user is always directed to /mydspace.
I'll do some tracing of the request, session, context etc. to see if I can find
out where/why this is happening.
For more information, take a look at
org.dspace.app.webui.filter.RegisteredOnlyFilter and
org.dspace.app.webui.util.Authenticate
(Also note that to my knowledge, "ShibbolethFilter" doesn't appear to be used
anywhere.. the RegisteredOnlyFilter is enough, since it starts stackable
authentication, and if Shibboleth is in there, it'll just be another auth
method.)
On a tangent, I just want to say it's great that you're taking an interest in
DSpace development above and beyond your GSoC project.. your efforts are
certainly appreciated by the community!
> Redirect users to current page on login
> ---------------------------------------
>
> Key: DS-570
> URL: http://jira.dspace.org/jira/browse/DS-570
> Project: DSpace 1.x
> Issue Type: New Feature
> Components: DSpace API
> Reporter: Caryn N.
> Assignee: Peter Dietz
> Priority: Minor
> Fix For: 1.7.0
>
> Attachments: xmlui.patch
>
>
> I would like to be able to direct a user to the "current" page after login.
> For example, if a user is not logged in, and they are looking at an item
> page, when they click login, I would like to be able to send them back to the
> item page.
> As it functions now, a user who has found an item they want, then clicked log
> in, will be authenticated and sent either home or to the profile (this option
> is set in dspace.cfg file). This means they will need to find the item they
> wanted again, which is not the most user-friendly.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.dspace.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel