• REST services : how to get SessionAsSigner or another session...

    By Michael Bourak 1 decade ago

    In SSJS, we can get SessionAsSigner. But when we are in pure Java -  for exemple when developing a custom REST Service (a custom RestServiceEngine class) - how do we get Session As Signer ?

    - I tried to use the extlibutil getSessionAsSigner, the NotesContext.GetSessionAsSigner... all return null

    - I tried to create a session using NotesFactory.createsession (...) (assuming I've the userid/password I want to use), but I get an exception "Cannot create a session from an agent‎".

     

    So, finally, my question is : in Java (not SSJS), on the XPages runtime, how can I execute code with other privilege than the current user session.

     

    Thanks

    • sessionAsSigner is only avail in an XPages request

      By Philippe Riand 1 decade ago

      As we need to know what are the design elements to guess the signers. A pure Java servlet has no design elements, thus no signer.

      • By Eric McCormick 7 years ago

        Could we either 1- assume that we're talking about the signer of the NSF or 2- provide a separate handle for sessionAsDatabase?