[GeoNode-users] Auth via Restful requests?
francesco bartoli
xbartolone at gmail.com
Wed Aug 15 01:06:08 PDT 2018
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/20180815/f93cad13/attachment.html>
More information about the geonode-users
mailing list