Bonjour Ludovic,

you need to
extend org.apache.webbeans.corespi.security.ManagedSecurityService to
implement getCurrentPrincipal() using probably a thread local to get the
request (or gettng it from CDI) to access the servlet principal.

The configuration of that service is done through openwebbeans.properties.


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Wordpress Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2016-07-08 0:45 GMT+02:00 [email protected] <[email protected]>:

> Hi?.
>
>
> Following John D. Ament and Romain Manni-Bucau advice, I use Tomcat
> embedded for integration tests and it works great.
>
>
> I have, however, one question : what should I do so that Principal gets
> correctly injected ?
>
> Any help or example welcome.
>
>
> Thanks in advance,
>
>
> Ludovic
>
>
> |
> | AVANT D'IMPRIMER, PENSEZ A L'ENVIRONNEMENT.
> |
>
>

Reply via email to