Jump to content

SSO Pre-auth with visualize

Go to solution Solved by srang,

Recommended Posts

In our embedded app we are trying to use the pre-auth token to sync users from our app to the jasperserver-pro we are running in AWS (version 6.0.1). I got it working in the java controllers using the rest client however I'm having trouble getting it to work with visualize. Visualize works completely fine with username:password authentication but when I change it out with the pre-auth token (they have an example in the visualize docs that I am following) it doesn't return. I watched the network logs and it goes to <jasperserver-pro>/xdm.htm then to <jasperserver-pro>/login.htm then a couple redirects and eventually hits <jasperserver-pro>/?pp=<token> and then just hangs. I looked at the server's response and it looks like it is a redirect to the home page. Has anyone gotten pre-auth sso working with visualize and if so did you see this problem or any other problems?


Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

So I think this has something to do with how jasper is managing a visualize session because when I restart the server, the auth token works the first time but if I try refreshing the page I'm doing the auth, it hangs. Also I've tried sending tokens for different users and it will still hang. However if I go to the actual server and try to hit the home page it will use the running visualize session and if I log out and then try visualize again it will work... Very interesting

Link to comment
Share on other sites

  • Solution

So I sort of came up with a way to get this to work. Like I said in a comment, the root of the problem is that when authenticating with plain text credentials when the user has an active session, it just returns. Conversely, when doing the same with pre-auth token authentication, it just hangs. I can go over to the server home page and log the user out and then refresh the page but obviously that isn't a reasonable solution for a user. So what I did to get around it was added:

    $(window).bind('beforeunload', function() {      visualize(function(v) {        v.logout();      });    });[/code]

This logs the user out between pages and makes it feasible (although not very efficient)

Link to comment
Share on other sites

  • 5 months later...


I'm having that same issue with JRS 6.0.1 and JRS 6.1.

My report generated via visualize.js is correctly displayed the first time I call it and then it is not when  I simply refresh my page. 

I have to delete my cookies in order to make it work again.

Unfortunately that logout solution is not enough because it won't work if you refresh the page before it's fully loaded.

Has anyone ffound a solution for that issue ?


Thank you.



Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...