users@jersey.java.net

JerseyTest with basic auth?

From: Philippe Marschall <philippe.marschall_at_netcetera.ch>
Date: Wed, 10 Nov 2010 12:00:03 +0100

Hi

In my resources I access a SecurityContext through @Context. That works
in deployment but not during unit tests. In my unit tests I add
HTTPBasicAuthFilter to the web resource but
SecurityContext#getUserPrincipal() always returns null. I assume this is
because the security constraints and login config are not set but I have
no idea how to set them.

Cheers
Philippe