anuradhe.prabhath Posted November 20, 2015 Posted November 20, 2015 This is my visualize.js code for token based authentication, but it doesn"t work, please some one can help me to solve this??? <script type="text/javascript" src="http://localhost:8083/jasperserver-pro/client/visualize.js?_opt=false&logLevel=debug"></script> <script type="text/javascript"> var authToken = encodeURIComponent("u=prabhath|r=role|o=EMEA|pa1=Sweden");visualize.config({server: "http://localhost:8083/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);}); </script>
jclarke_1 Posted November 23, 2015 Posted November 23, 2015 Are you getting an error? Can you see the /auth call being made in your browser console? Our token auth looks a little different than yours: visualize({ auth: { token: theToken, tokenName: "ticket" } }, function(v){ _reportService = v; _exportFormats = v.report.exportFormats; }, function(err){ _handleError("An error occurred while attempting to connect to the reporting service. " + err.message, err); });
anuradhe.prabhath Posted December 4, 2015 Author Posted December 4, 2015 Hi,Thanks for the reply. I realized my code is ok. wrong is I didn"t configure the jasperserver correctly to the token based authentication. thank you for your reply :)
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