[ 
https://issues.apache.org/jira/browse/FEDIZ-195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15940011#comment-15940011
 ] 

gonzalad commented on FEDIZ-195:
--------------------------------

Hi Sergey, 

In case no fragment is available (i.e. ), no empty srting is added in 
form.action (so no value is added).

We have the following code :
{code}
+            var hash = decodeURIComponent(self.document.location.hash);
 +
 +            // The fragment value may not contain a leading # symbol
 +            if (hash && hash.indexOf("#") === -1) {
 +                hash = "#" + hash;
 +            }
 +            form.action = form.action + hash;
{code}

with a document location = https://localhost:8443/fediz-idp/federation/up/login
then :
 * hash = "" (as returned from decodeURIComponent(self.document.location.hash))
 * and {code}if (""){code} in javascript return false (see 
http://stackoverflow.com/a/154068/1565142)
 * and so, form.action = form.action + hash is equivalent to form.action = 
form.action + ""

I've tested it with Chrome and FF.


> OIDC: propagate URI fragment during authentication
> --------------------------------------------------
>
>                 Key: FEDIZ-195
>                 URL: https://issues.apache.org/jira/browse/FEDIZ-195
>             Project: CXF-Fediz
>          Issue Type: Improvement
>          Components: IDP, OIDC
>            Reporter: gonzalad
>
> Some SPA applications (i.e. AngularJs) rely on URI fragments to track 
> end-user navigation inside the app (i.e. http://myapp.com#myroute).
> These fragments can be bookmarked.
> The problem is that redirecting URL anchors are not preserved during SSO 
> process.
> We could implement something like : 
> https://wiki.jasig.org/display/casum/preserving+url+anchor+fragments+on+login+form+submission.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to