[ome-devel] webgateway authentication

William Moore (Staff) W.Moore at dundee.ac.uk
Tue Aug 7 08:29:41 BST 2018


Hi Manuel,

 Apologies for the confusion.

All http calls to OMERO.web will close any statefull services they use, so this will limit the
resources that are consumed on the server during your session. However, it is still a good idea to
log out when you are done, since this will free up the server session and prevent large stale session cleanups every 30 minutes.

It is fine to combine /api/ and /webgateay/ or /webclient/ URLs in the same session.
There’s no technical difference between them. It’s just that the /api/ URLs are
designed to be more consistent and are better documented.

 Regards,

   Will.


PS: did you also see the JSONClient.java example linked under https://docs.openmicroscopy.org/omero/5.4.6/developers/json-api.html#getting-started ?
Is that any use to you?


On 7 Aug 2018, at 07:33, Manuel Stritt <manuel.stritt at idorsia.com<mailto:manuel.stritt at idorsia.com>> wrote:

Hi Damir,

thanks a lot for that.

Here you do the logout via the URL /webclient/logout/
And for the login you are using /webclient/login/

According to the documentation
https://docs.openmicroscopy.org/omero/5.4.7/developers/json-api.html#getting-started
I'm using the URL
/api/v0/login/
for login instead.
So should we use the /webclient/ methods or the /api/v0/ methods?

Unfortunately there's no /api/v0/logout/ available, this only works via /webclint/logout/.

Or can these two be combined, e.g. login with /api/v0/login/ and logout via /webclient/logout/ ?

Regards,
Manuel



On Mon, Aug 6, 2018 at 10:06 PM, Damir Sudar <dsudar at lbl.gov<mailto:dsudar at lbl.gov>> wrote:
Hi Manuel,

Roger Noble from Zegami put together a small python program to connect to an OMERO server via the webgateway and retrieve data and visualizations. Originally that was developed for public repositories such as IDR, but I submitted some code to enable it to work with non public servers with full authentication which is now integrated into that package. I used the python requests package to handle opening and closing the session. See:
https://github.com/zegami/omero-idr-fetch

Cheers,
Damir

Sent from my iPad, please excuse poor spelling

On Aug 6, 2018, at 08:20, Manuel Stritt <manuel.stritt at idorsia.com<mailto:manuel.stritt at idorsia.com>> wrote:

Dear all,

one more question regarding the webgateway. Currently I
- get a crsf-token
- login using the crsf-token and get a session-id
- do s.th<http://s.th/>. e.g. query image data

now - should I not close the session or do a logout at the end?

I guess it will timeout after a while.  So is it correct to just create new sessions / login calls - or is there a way to close it?

Regards,
Manuel



Hi Manuel

You'll always need to create a web Django session. Have you seen https://docs.openmicroscopy.org/omero/5.4.7/developers/json-api.html#getting-started ? It includes an example of using Python to log in to web.

Simon


On 3 August 2018 at 15:05, Manuel Stritt <manuel.stritt at idorsia.com<mailto:manuel.stritt at idorsia.com>> wrote:
Dear all,

I'm using the webgateway to programmatically e.g. download images. That works if a user used the web viewer before and logged in there,
but it would be nice to use the webgateway completely programmatically without user interaction.

Is there a way to perform an authentication via rest-API / webgateway directly?

Regards,
Manuel




The information of this email and in any file transmitted with it is strictly confidential and may be legally privileged.
It is intended solely for the addressee. If you are not the intended recipient, any copying, distribution or any other use of this email is prohibited and may be unlawful. In such case, you should please notify the sender immediately and destroy this email.
The content of this email is not legally binding unless confirmed by letter.
Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of the sender's company.

_______________________________________________
ome-devel mailing list
ome-devel at lists.openmicroscopy.org.uk<mailto:ome-devel at lists.openmicroscopy.org.uk>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel



The University of Dundee is a registered Scottish Charity, No: SC015096

_______________________________________________
ome-devel mailing list
ome-devel at lists.openmicroscopy.org.uk<mailto:ome-devel at lists.openmicroscopy.org.uk>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel





The information of this email and in any file transmitted with it is strictly confidential and may be legally privileged.
It is intended solely for the addressee. If you are not the intended recipient, any copying, distribution or any other use of this email is prohibited and may be unlawful. In such case, you should please notify the sender immediately and destroy this email.
The content of this email is not legally binding unless confirmed by letter.
Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of the sender's company.
_______________________________________________
ome-devel mailing list
ome-devel at lists.openmicroscopy.org.uk<mailto:ome-devel at lists.openmicroscopy.org.uk>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel

_______________________________________________
ome-devel mailing list
ome-devel at lists.openmicroscopy.org.uk<mailto:ome-devel at lists.openmicroscopy.org.uk>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel






The information of this email and in any file transmitted with it is strictly confidential and may be legally privileged.
It is intended solely for the addressee. If you are not the intended recipient, any copying, distribution or any other use of this email is prohibited and may be unlawful. In such case, you should please notify the sender immediately and destroy this email.
The content of this email is not legally binding unless confirmed by letter.
Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of the sender's company.
_______________________________________________
ome-devel mailing list
ome-devel at lists.openmicroscopy.org.uk<mailto:ome-devel at lists.openmicroscopy.org.uk>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel


The University of Dundee is a registered Scottish Charity, No: SC015096
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20180807/b4a05c86/attachment.html>


More information about the ome-devel mailing list