Page 1 of 1

OmeroCli: session file is not removed

PostPosted: Wed Oct 24, 2012 2:56 pm
by dasesan
Hi there,

I am using OmeroCli (4.4.4-ice34-b3099) and I am kind of confused by how the 'session-dir' flag works.

If I set a customized directory for the session files by using: login --session-dir /tmp

the first session file is properly created but it doesn't get removed after logging out. Consequently if I, afterwards, type again 'login --session-dir /tmp' to log in with a different user then OmeroCli logs me in with the old session file, and therefore with the previously logged on user.

Additionally, according to the documentation, one could see the current path to the session file by typing 'sessions file' in OmeroCli. I get no path whatsoever with this command if I have first set the path via 'session-dir'. I do get the default path if I omit the 'session-dir' option.

Does anybody know if this is the intended behavior?

Cheers!

Re: OmeroCli: session file is not removed

PostPosted: Thu Oct 25, 2012 9:59 am
by sbesson
Hi,

the OmeroCli sessions plugin currently always uses the default session directory unless specified otherwise. If logging in with the following command:

Code: Select all
dist/bin/omero sessions login --session-dir=/tmp


you should be able to inspect your session file with:

Code: Select all
dist/bin/omero sessions file --session-dir=/tmp


and logout (incl. removing the session file) with the following:

Code: Select all
dist/bin/omero sessions logout --session-dir=/tmp


Let me know if this doesn't work,
Sebastien

Re: OmeroCli: session file is not removed

PostPosted: Thu Oct 25, 2012 11:08 am
by dasesan
Hi Sebastien,

It does work. Thanks a lot for taking me out of the loop :) I guess I got confused with the help texts of the 'sessions logout' and the 'logout' commands. The latter shows no 'session-dir' option and I thought it was a wrapper for the former...

I really appreciate your help,
Daniel