[Apiman-user] Error 401 - Unit test with gateway

Charles Moulliard cmoulliard at redhat.com
Fri Feb 19 13:17:52 EST 2016


Hi,

I have developed a unit test to control the REST Gateway Api when 
deployed into Karaf using Apache HttpClient but when I issue this request

https://localhost:8444/apiman-gateway-api/system/status

I receive an error 401

https://gist.githubusercontent.com/cmoulliard/daa13f336b04ba625af4/raw/f9147c9d426c5457ba0a9df09c4af324f2879982/gistfile1.txt

2016-02-19 19:09:10,722 | INFO  | (3)-192.168.1.80 | 
HttpServiceFactoryImpl           | 66 - 
org.ops4j.pax.web.pax-web-runtime - 3.2.4 | Unbinding bundle: 
[io.apiman.apiman-gateway-osgi-api [212]]
javax.servlet.ServletException
     at org.eclipse.jetty.server.Request.login(Request.java:2109)
     at 
io.apiman.common.servlet.AuthenticationFilter.doBasicAuth(AuthenticationFilter.java:232)

As the same request works pretty well when issued using curl/httpie tool 
against the Karaf container running in standalone mode, I 'm wondering 
why it fails with HttpClient & Basic Authentication ?

Regards,

Charles
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/apiman-user/attachments/20160219/d2ec325e/attachment.html 


More information about the Apiman-user mailing list