Login Service RESTv2 POST problem

0

Hello all, I have a problem testing the POST method for loggin service via rest_v2 api

been checking this link(http://community.jaspersoft.com/documentation/tibco-jasperreports-server...) alot and i cant solve it

GET method has no problem

POST method has problem kindly see image attach for the POSTMAN

 

any hint where am i doing wrong?

Thanks

ralphskie's picture
Joined: Jan 5 2017 - 12:05am
Last seen: 2 years 8 months ago

3 Answers:

0

Look under jasperserver/WEB-INF/logs to find the exact cause of the 500.

hozawa's picture
56242
Joined: Apr 24 2010 - 4:31pm
Last seen: 7 months 1 week ago
0

Hi Hozawa

here's the log

ERROR CsrfGuard,http-apr-8080-exec-3:44 - potential cross-site request forgery (CSRF) attack thwarted (user:<anonymous>, ip:127.0.0.1, method:POST, uri:/jasperserver/rest/login, error:required token is missing from the request)
2017-01-06 16:40:50,877 ERROR CsrfGuard,http-apr-8080-exec-5:44 - potential cross-site request forgery (CSRF) attack thwarted (user:<anonymous>, ip:127.0.0.1, method:POST, uri:/jasperserver/rest/login/, error:required token is missing from the request)
Token is required?where should i get the token? or set it on the server?
PS - notice the ending slash on the 2nd URI
ralphskie's picture
Joined: Jan 5 2017 - 12:05am
Last seen: 2 years 8 months ago
0

There's a wiki page about the error you've mentioned:

http://community.jaspersoft.com/wiki/csrfguard-errorrequired-token-missi...

hozawa's picture
56242
Joined: Apr 24 2010 - 4:31pm
Last seen: 7 months 1 week ago
Feedback