djain_1 Posted August 31, 2015 Share Posted August 31, 2015 I am using Jasper 6.1 and configured my server to allow token based authentication. It works fine when i use token to login from browser. With the valid token, I am able to get into the system without entering username and password.Now, I am integrating it with visualize.js in order to show reports on our application's web page. Below is request call :-var authToken = encodeURIComponent("u=jsmith|r=admin|exp=20150831172506-0800|t=ABC");visualize.config({server: "http://localhost:8080/jasperserver-pro",scripts: "optimized-scripts",logEnabled: true,logLevel: "error",auth: {token: authToken,preAuth: true,tokenName: "pp"}}, function (v) { $scope.v = v; $scope.reportingInitialized = true; $scope.$digest();}, function (err) { alert("Auth error! Server said: " + err.message);});However, on successful authentication it is not redirecting to success url but returning the below html with HTTP code 200. Due to which the Authentication is failing with the error message as "Unexpected token <".Appreciate any help on this.<html><head><title></title><meta http-equiv="refresh" content="0;url=home.html"><script language="javascript" type="text/javascript">window.location="home.html";</script></head><body>If your browser doesn't automatically go there,you may want to go to <a href="home.html">the destination</a>manually.</body></html> Link to comment Share on other sites More sharing options...
mehulkatara Posted March 3, 2018 Share Posted March 3, 2018 Follow this link for Jasper Token Based Authenticationhttps://github.com/mehulkatara/Jasper-Token-based-Authentication Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now