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

Eric Wittmann eric.wittmann at redhat.com
Thu Feb 25 07:51:29 EST 2016


My guess is that the credentials are incorrect.  I can't think of any 
other reason.  The credentials used in the unit test must be different 
from the user configuration you have in karaf?

On 2/19/2016 1:17 PM, Charles Moulliard wrote:
> 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
>
>
> _______________________________________________
> Apiman-user mailing list
> Apiman-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/apiman-user
>


More information about the Apiman-user mailing list