alphaville / ToxOtis

An HTTP client for consuming OpenTox predictive toxicology web services.
http://opentox.ntua.gr/wiki
6 stars 1 forks source link

List Policies fails #21

Closed alphaville closed 13 years ago

alphaville commented 13 years ago

Test org.opentox.toxotis.util.aa.policy.PolicyTest#testListPolicies() fails with message:

UnknownCauseOfException - Service returned status code : 400 at org.opentox.toxotis.util.aa.policy.Policy.listPolicyUris(Policy.java:299) at org.opentox.toxotis.util.aa.policy.PolicyTest.testListPolicies(PolicyTest.java:66)

alphaville commented 13 years ago

Tried also via command line:

curl -k -i -X GET https://opensso.in-silico.ch/Pol/opensso-pol -H "subjectid: AQIC5wM2LY4SfcyosUushi5IAlLbdLfqlB1WXyJ0iSgat3M%3D%40AAJTSQACMDE%3D%23"

Though my token is fresh here's the response I get:

HTTP/1.1 400 Bad Request Server: nginx/0.6.32 Date: Mon, 29 Nov 2010 18:18:13 GMT Content-Type: text/plain Connection: keep-alive Content-Length: 59

Token could not be resolved to a user id. Token expired?.

Something similar holds when using the latest URI of the policy service:

curl -k -i -X GET https://opensso.in-silico.ch/pol -H "subjectid: AQIC5wM2LY4SfcyosUushi5IAlLbdLfqlB1WXyJ0iSgat3M%3D%40AAJTSQACMDE%3D%23"

HTTP/1.1 400 Bad Request Server: nginx/0.6.32 Date: Mon, 29 Nov 2010 18:19:08 GMT Content-Type: text/html;charset=utf-8 Connection: keep-alive Content-Length: 59

Apache Tomcat/6.0.26 - Error report</tit The above token is valid according to the validation service: curl -k -i -X POST https://opensso.in-silico.ch/auth/isTokenValid -d tokenid="AQIC5wM2LY4SfcyosUushi5IAlLbdLfqlB1WXyJ0iSgat3M%3D%40AAJTSQACMDE%3D%23" returns HTTP/1.1 200 OK Server: nginx/0.6.32 Date: Mon, 29 Nov 2010 18:24:10 GMT Content-Type: text/plain;charset=UTF-8 Connection: keep-alive Content-Length: 13 boolean=true </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/alphaville"><img src="https://avatars.githubusercontent.com/u/125415?v=4" />alphaville</a> commented <strong> 13 years ago</strong> </div> <div class="markdown-body"> <p>Bug solved. Should have sent the token not URL-encoded! Must check for other places in the source code where tokens are encoded!</p> </div> </div> <div class="page-bar-simple"> </div> <div class="footer"> <ul class="body"> <li>© <script> document.write(new Date().getFullYear()) </script> Githubissues.</li> <li>Githubissues is a development platform for aggregating issues.</li> </ul> </div> <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script> <script src="/githubissues/assets/js.js"></script> <script src="/githubissues/assets/markdown.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/highlight.min.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/go.min.js"></script> <script> hljs.highlightAll(); </script> </body> </html>