[ome-devel] webgateway authentication

Damir Sudar dsudar at lbl.gov
Mon Aug 6 21:06:03 BST 2018


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> 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. 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> 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
>>> 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
>> 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
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20180806/68d93f53/attachment.html>


More information about the ome-devel mailing list