From an external application, I am calling a rest web service that is implemented in Jspresso.
In the Jspresso web service, I would like to initialize the environment/context in order to act like a user connected by the login module.
Is there a method to call to initialize the environment (userPrincipal, ...)
Normally, your web services classes should extend
org.jspresso.framework.application.startup.AbstractBackendStartup
. Then you can use the following protected methods :protected Subject createSubject(String userName)
protected void configureApplicationSession(Subject subject, Locale locale)
This will initialize a session with all necessary information.