To avoid further duplicated replies, fwding Charles' mail to me...
-------- Forwarded Message --------
Problem solved. My karaf unit test missed the file containing the Jetty
REALM to authenticate the use.
On 19/02/16 20:34, Marc Savy wrote:
The only thing I can imagine is that you constructed the
Authorization
header incorrectly and/or the test isn't using the auth information
you're assuming?
It's impossible to guess from the information you've provided I'm afraid
On 19/02/2016 18:17, 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/f9...
>
>
> 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(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/apiman-user
>