tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Louis Monteiro <jlmonte...@tomitribe.com>
Subject Re: ApplicationComposer and secured WebService
Date Wed, 14 May 2014 06:12:48 GMT
Try adding a method annotated with @Configuration and add the following as
the content
        final Properties p = new Properties();
        p.setProperty("cxf-rs.auth", "BASIC");
        return p;


That should work
--
Jean-Louis Monteiro
http://twitter.com/jlouismonteiro
http://www.tomitribe.com


On Fri, May 9, 2014 at 6:19 AM, Xavier Dury <kalgon@hotmail.com> wrote:

> Hi,
> I am using ApplicationComposer to test an EJB exposed as a WebService.
> My service is secured with @RolesAllowed and I would like to use BASIC
> authentication or disable security for the test.
> As I don't know how to disable security, I tried to activate BASIC
> authentication (with groups/user.properties).
> To do that, I would either need:- an openejb-jar.xml with the proper
> config, but then I don't know how to include this file in my @Module
> EjbJar;- or configure BASIC authentication on my @Module EnterpriseBean,
> but then I don't see any method on StatelessBean that can do that.
> Does anybody have an idea how to do that?
> The only way that works is by using EjbContainerRunner (which deploys
> everything including openejb-jar.xml) but as I would like to use some
> mocks, I would prefer using ApplicationComposerRunner instead.
> Thanks,
> Xavier
>
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message