[#5141] - Token-based Authentication - Authentication error

Category:
Bug report
Priority:
Normal
Status:
New
Project: Severity:
Block
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:

Am using jasper commercial trial version 6.1 where I followed http://community.jaspersoft.com/documentation/jasperreports-authenticati... link to configure jasper for Token-based Authentication using visualize.js
.
For very first request it works perfect and got alert saying "You are now logged into JasperReports Server with your token." but when I make second request I got the error message saying "Authentication error".

Below is request call :-

var authToken = encodeURIComponent("u=John|o=organization_1|pa1=USA|pa2=1");
visualize.config({
server: "http://localhost:8080/jasperserver-pro",
scripts: "optimized-scripts",
logEnabled: true,
logLevel: "error",
auth: {
token: authToken,
preAuth: true,
tokenName: "pp"
}

});

If I delete localhost cookies, it works perfect for first request, after refreshing the page and call the function I got Authentication error message.

v6.1
Secuirty
arvind.chauhan's picture
Joined: Jul 5 2015 - 8:07am
Last seen: 7 years 5 months ago

3 Comments:

#1

I debugged this and looks to me if user is already authenticated the request is not being redirect to authSuccessJsonRedirectUrl. If I did so it worked :)

#2

Hi,

I am facing the similar issue. My request is exactly similar to what is mentioned above. 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 you can provide.

<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>

#3

Hi arvind chauhan,

Have you been able to fix it ?

Thank you for your help.
Jade

Feedback