JSESSIONID check if session is active
Hi there (again :-) ),
I want to check if a session is active by checking the JSESSIONID. Does nuxeo have a get request which can check this?
*EDIT I would like to have something like this: GET http://localhost:8080/nuxeo/validateuser/bauke.roo@testdomain.nl/JSESSION-ID=30932m9c84093242*
Thanks, Bauke Roo
0 votes
1 answers
2075 views
I ended up with creating a webengine module, checking only the username by getting the context (which is probably the JSESSION).
@Path("/validate/{user}")
@Produces("text/html;charset=UTF-8")
@WebObject(type="validate")
public class ValidateUser extends ModuleRoot{
/**
*
* @param user: the username from the url
* @return 1 if the user corresponds with the session user,
* @return 0 of it does not.
* @throws Exception
*/
@GET
public Object doGet(@PathParam("user") String user) throws Exception{
if (user.equals(this.getContext().getPrincipal().getName()))
For me this is seems to be fine for now :-)