On 08/07/2016 00:50, Romain Manni-Bucau wrote:
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.
Thanks (again) for your kind and quick reply.
I did not suceed to let openwebbeans.properties scanned when using
tomcat embedded. I use openwebbeans.properties in other projects, but in
"regular tomcat".
I took another way : I use the servlet module and
@Inject @DeltaSpike
HttpServletRequest request;
then request.getUserPrincipal() and zou.
I would be interested however to find how to get openwebbeans.properties
taken into account by tomcat embedded. :-)
Thanks again;
Ludovic
|
| AVANT D'IMPRIMER, PENSEZ A L'ENVIRONNEMENT.
|