[GeoNode-users] Auth via Restful requests?

Gus MacAulay gusmacaulay at gmail.com
Mon Aug 20 00:01:30 PDT 2018


Thanks for that, however I don't think an api key provides what I'm looking
for.  I need a way to submit login credentials via POST without performing
the geonode form submission, so I can capture any errors in my app and not
get redirected - this is what I meant by Restful login, apologies if not
clear.

Regards
Gus

On Wed, 15 Aug 2018 at 18:09, francesco bartoli <xbartolone at gmail.com>
wrote:

> Also certainly any documented procedure is missing so if you are happy
> with that a PR for docs would be appreciated :)
>
> Thanks,
> Francesco
>
> Il giorno mer 15 ago 2018 alle ore 10:06 francesco bartoli <
> xbartolone at gmail.com> ha scritto:
>
>> Hi,
>>
>> you are lucky that feature already exists. You should add a fixture to
>> have an apykey from tastypie like this:
>>
>> [
>>
>> {
>> "fields": {
>> "user": 1000,
>> "key": "pyxW5djJ7XsjeFUXduAsGpR4xMGUwpeBGQRqTeT3",
>> "created": "2018-06-28T14:54:51Z"
>> },
>> "model": "tastypie.apikey",
>> "pk": 1
>> }
>> ]
>> and then use such key to your calls to geonode api systems. The code
>> responsible for this should be here:
>>
>>
>> https://github.com/GeoNode/geonode/blob/master/geonode/api/authorization.py#L80
>>
>> Please see the PR which provided it
>> https://github.com/GeoNode/geonode/pull/3415, is it enough for your use
>> case?
>>
>> Il giorno mer 15 ago 2018 alle ore 05:58 Gus MacAulay <
>> gusmacaulay at gmail.com> ha scritto:
>>
>>> Hi List,
>>>
>>> I've been working on a custom web application which uses geonode for
>>> data catalog and auth.  So far we have used a form submission POST from
>>> javascript and various page scrapes (access token etc.) to allow login and
>>> registration from our app to geonode - however we have run into some
>>> limitations with regard to redirects on login error.  It doesn't look like
>>> there is currently a way to login RESTfully - assuming this doesn't already
>>> exist, can  someone point me in the direction of what code I would need to
>>> modify/enhance to add this functionality?
>>>
>>> Regards
>>> Gus
>>> _______________________________________________
>>> geonode-users mailing list
>>> geonode-users at lists.osgeo.org
>>> https://lists.osgeo.org/mailman/listinfo/geonode-users
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20180820/83bb8fc5/attachment.html>


More information about the geonode-users mailing list