get-current-user()

Saturday, 14 March 2015 · 4 messages · last reply 24 Mar 2015
MG
Marc van Grootel14 Mar 2015 12:13 #
Hi, Maybe I'm missing something but I cannot find the XQuery way to get access to the logged in user from a web application using RESTXQ. The servlet request object has getRemoteUser and Exist, for example, has xmldb:get-current-user and Marklogic has xdmp:get-current-user. I don't need to know intricate user details just need the handle on the logged in / authenticated user (possibly from the servlet request object?) --Marc
CG
Christian Grün14 Mar 2015 16:17 #
Quoted text · Marc van Grootel · 5 lines
> Maybe I'm missing something but I cannot find the XQuery way to get > access to the logged in user from a web application using RESTXQ. > > The servlet request object has getRemoteUser and Exist, for example, > has xmldb:get-current-user and Marklogic has xdmp:get-current-user.
We could add a function user:current() to the new User Module [1]. More suggestions on other, possibly missing, functions are welcome. Best, Christian [1] http://docs.basex.org/wiki/User_Module
MG
Marc van Grootel21 Mar 2015 15:16 #
Hi Christian, Not sure what else. I'm only starting to delve into this area and I'm not sure what else would be helpful. In general I'm looking at creating a small REST atompub service that handles authentication and this was one of the missing pieces I encountered. Cheers,
Quoted text · Christian Grün · 15 lines
On Sat, Mar 14, 2015 at 4:17 PM, Christian Grün <christian.gruen at gmail.com> wrote: >> Maybe I'm missing something but I cannot find the XQuery way to get >> access to the logged in user from a web application using RESTXQ. >> >> The servlet request object has getRemoteUser and Exist, for example, >> has xmldb:get-current-user and Marklogic has xdmp:get-current-user. > > We could add a function user:current() to the new User Module [1]. > More suggestions on other, possibly missing, functions are welcome. > > Best, > Christian > > [1] http://docs.basex.org/wiki/User_Module
-- --Marc
CG
Christian Grün24 Mar 2015 14:55 #
Hi Marc, the function is now available in the 8.1 snapshot [1]. Best, Christian [1] http://docs.basex.org/wiki/User_Module#user:current
Quoted text · Marc van Grootel · 32 lines
On Sat, Mar 21, 2015 at 3:16 PM, Marc van Grootel <marc.van.grootel at gmail.com> wrote: > Hi Christian, > > Not sure what else. I'm only starting to delve into this area and I'm > not sure what else would be helpful. In general I'm looking at > creating a small REST atompub service that handles authentication and > this was one of the missing pieces I encountered. > > Cheers, > > > On Sat, Mar 14, 2015 at 4:17 PM, Christian Grün > <christian.gruen at gmail.com> wrote: >>> Maybe I'm missing something but I cannot find the XQuery way to get >>> access to the logged in user from a web application using RESTXQ. >>> >>> The servlet request object has getRemoteUser and Exist, for example, >>> has xmldb:get-current-user and Marklogic has xdmp:get-current-user. >> >> We could add a function user:current() to the new User Module [1]. >> More suggestions on other, possibly missing, functions are welcome. >> >> Best, >> Christian >> >> [1] http://docs.basex.org/wiki/User_Module > > > > -- > --Marc

⚡Generated with XQuery