<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: JSESSIONID check if session is active in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/jsessionid-check-if-session-is-active/m-p/322885#M9886</link>
    <description>&lt;P&gt;I ended up with creating a webengine module, checking only the username by getting the context (which is probably the JSESSION).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;@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()))
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;For me this is seems to be fine for now &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 12 Feb 2014 10:40:15 GMT</pubDate>
    <dc:creator>Bauke_Roo</dc:creator>
    <dc:date>2014-02-12T10:40:15Z</dc:date>
    <item>
      <title>JSESSIONID check if session is active</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/jsessionid-check-if-session-is-active/m-p/322884#M9885</link>
      <description>&lt;P&gt;Hi there (again &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; ),&lt;/P&gt;
&lt;P&gt;I want to check if a session is active by checking the JSESSIONID.
Does nuxeo have a get request which can check this?&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;EDIT
I would like to have something like this:
GET &lt;A href="http://localhost:8080/nuxeo/validateuser/bauke.roo@testdomain.nl/JSESSION-ID=30932m9c84093242" target="test_blank"&gt;http://localhost:8080/nuxeo/validateuser/bauke.roo@testdomain.nl/JSESSION-ID=30932m9c84093242&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Thanks,
Bauke Roo&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2014 15:18:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/jsessionid-check-if-session-is-active/m-p/322884#M9885</guid>
      <dc:creator>Bauke_Roo</dc:creator>
      <dc:date>2014-02-06T15:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: JSESSIONID check if session is active</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/jsessionid-check-if-session-is-active/m-p/322885#M9886</link>
      <description>&lt;P&gt;I ended up with creating a webengine module, checking only the username by getting the context (which is probably the JSESSION).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;@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()))
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;For me this is seems to be fine for now &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2014 10:40:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/jsessionid-check-if-session-is-active/m-p/322885#M9886</guid>
      <dc:creator>Bauke_Roo</dc:creator>
      <dc:date>2014-02-12T10:40:15Z</dc:date>
    </item>
  </channel>
</rss>

