<div dir="ltr">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.<div><br></div><div>Regards</div><div>Gus</div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, 15 Aug 2018 at 18:09, francesco bartoli <<a href="mailto:xbartolone@gmail.com">xbartolone@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Also certainly any documented procedure is missing so if you are happy with that a PR for docs would be appreciated :)<div><br></div><div>Thanks,</div><div>Francesco</div></div><br><div class="gmail_quote"><div dir="ltr">Il giorno mer 15 ago 2018 alle ore 10:06 francesco bartoli <<a href="mailto:xbartolone@gmail.com" target="_blank">xbartolone@gmail.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>you are lucky that feature already exists. You should add a fixture to have an apykey from tastypie like this:</div><div><br></div><div><table class="m_7523955012696232573m_-5232613197006588396gmail-highlight m_7523955012696232573m_-5232613197006588396gmail-tab-size m_7523955012696232573m_-5232613197006588396gmail-js-file-line-container" style="box-sizing:border-box;border-collapse:collapse;color:rgb(36,41,46);font-family:-apple-system,system-ui,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:14px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><tbody style="box-sizing:border-box"><tr style="box-sizing:border-box"><td id="m_7523955012696232573m_-5232613197006588396gmail-LC1" class="m_7523955012696232573m_-5232613197006588396gmail-blob-code m_7523955012696232573m_-5232613197006588396gmail-blob-code-inner m_7523955012696232573m_-5232613197006588396gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;color:rgb(36,41,46);word-wrap:normal;white-space:pre-wrap"><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"> [</blockquote></td></tr><tr style="box-sizing:border-box"><td id="m_7523955012696232573m_-5232613197006588396gmail-L2" class="m_7523955012696232573m_-5232613197006588396gmail-blob-num m_7523955012696232573m_-5232613197006588396gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;width:50px;min-width:50px;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;line-height:20px;color:rgba(27,31,35,0.3);text-align:right;white-space:nowrap;vertical-align:top"></td><td id="m_7523955012696232573m_-5232613197006588396gmail-LC2" class="m_7523955012696232573m_-5232613197006588396gmail-blob-code m_7523955012696232573m_-5232613197006588396gmail-blob-code-inner m_7523955012696232573m_-5232613197006588396gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;color:rgb(36,41,46);word-wrap:normal;white-space:pre-wrap"> {</td></tr><tr style="box-sizing:border-box"><td id="m_7523955012696232573m_-5232613197006588396gmail-L3" class="m_7523955012696232573m_-5232613197006588396gmail-blob-num m_7523955012696232573m_-5232613197006588396gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;width:50px;min-width:50px;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;line-height:20px;color:rgba(27,31,35,0.3);text-align:right;white-space:nowrap;vertical-align:top"></td><td id="m_7523955012696232573m_-5232613197006588396gmail-LC3" class="m_7523955012696232573m_-5232613197006588396gmail-blob-code m_7523955012696232573m_-5232613197006588396gmail-blob-code-inner m_7523955012696232573m_-5232613197006588396gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;color:rgb(36,41,46);word-wrap:normal;white-space:pre-wrap"> <span class="m_7523955012696232573m_-5232613197006588396gmail-pl-s" style="box-sizing:border-box;color:rgb(3,47,98)"><span class="m_7523955012696232573m_-5232613197006588396gmail-pl-pds" style="box-sizing:border-box;color:rgb(3,47,98)">"</span>fields<span class="m_7523955012696232573m_-5232613197006588396gmail-pl-pds" style="box-sizing:border-box;color:rgb(3,47,98)">"</span></span>: {</td></tr><tr style="box-sizing:border-box"><td id="m_7523955012696232573m_-5232613197006588396gmail-L4" class="m_7523955012696232573m_-5232613197006588396gmail-blob-num m_7523955012696232573m_-5232613197006588396gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;width:50px;min-width:50px;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;line-height:20px;color:rgba(27,31,35,0.3);text-align:right;white-space:nowrap;vertical-align:top"></td><td id="m_7523955012696232573m_-5232613197006588396gmail-LC4" class="m_7523955012696232573m_-5232613197006588396gmail-blob-code m_7523955012696232573m_-5232613197006588396gmail-blob-code-inner m_7523955012696232573m_-5232613197006588396gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;color:rgb(36,41,46);word-wrap:normal;white-space:pre-wrap"> <span class="m_7523955012696232573m_-5232613197006588396gmail-pl-s" style="box-sizing:border-box;color:rgb(3,47,98)"><span class="m_7523955012696232573m_-5232613197006588396gmail-pl-pds" style="box-sizing:border-box;color:rgb(3,47,98)">"</span>user<span class="m_7523955012696232573m_-5232613197006588396gmail-pl-pds" style="box-sizing:border-box;color:rgb(3,47,98)">"</span></span>: <span class="m_7523955012696232573m_-5232613197006588396gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,92,197)">1000</span>,</td></tr><tr style="box-sizing:border-box"><td id="m_7523955012696232573m_-5232613197006588396gmail-L5" class="m_7523955012696232573m_-5232613197006588396gmail-blob-num m_7523955012696232573m_-5232613197006588396gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;width:50px;min-width:50px;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;line-height:20px;color:rgba(27,31,35,0.3);text-align:right;white-space:nowrap;vertical-align:top"></td><td id="m_7523955012696232573m_-5232613197006588396gmail-LC5" class="m_7523955012696232573m_-5232613197006588396gmail-blob-code m_7523955012696232573m_-5232613197006588396gmail-blob-code-inner m_7523955012696232573m_-5232613197006588396gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;color:rgb(36,41,46);word-wrap:normal;white-space:pre-wrap"> <span class="m_7523955012696232573m_-5232613197006588396gmail-pl-s" style="box-sizing:border-box;color:rgb(3,47,98)"><span class="m_7523955012696232573m_-5232613197006588396gmail-pl-pds" style="box-sizing:border-box;color:rgb(3,47,98)">"</span>key<span class="m_7523955012696232573m_-5232613197006588396gmail-pl-pds" style="box-sizing:border-box;color:rgb(3,47,98)">"</span></span>: <span class="m_7523955012696232573m_-5232613197006588396gmail-pl-s" style="box-sizing:border-box;color:rgb(3,47,98)"><span class="m_7523955012696232573m_-5232613197006588396gmail-pl-pds" style="box-sizing:border-box;color:rgb(3,47,98)">"</span>pyxW5djJ7XsjeFUXduAsGpR4xMGUwpeBGQRqTeT3<span class="m_7523955012696232573m_-5232613197006588396gmail-pl-pds" style="box-sizing:border-box;color:rgb(3,47,98)">"</span></span>,</td></tr><tr style="box-sizing:border-box"><td id="m_7523955012696232573m_-5232613197006588396gmail-L6" class="m_7523955012696232573m_-5232613197006588396gmail-blob-num m_7523955012696232573m_-5232613197006588396gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;width:50px;min-width:50px;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;line-height:20px;color:rgba(27,31,35,0.3);text-align:right;white-space:nowrap;vertical-align:top"></td><td id="m_7523955012696232573m_-5232613197006588396gmail-LC6" class="m_7523955012696232573m_-5232613197006588396gmail-blob-code m_7523955012696232573m_-5232613197006588396gmail-blob-code-inner m_7523955012696232573m_-5232613197006588396gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;color:rgb(36,41,46);word-wrap:normal;white-space:pre-wrap"> <span class="m_7523955012696232573m_-5232613197006588396gmail-pl-s" style="box-sizing:border-box;color:rgb(3,47,98)"><span class="m_7523955012696232573m_-5232613197006588396gmail-pl-pds" style="box-sizing:border-box;color:rgb(3,47,98)">"</span>created<span class="m_7523955012696232573m_-5232613197006588396gmail-pl-pds" style="box-sizing:border-box;color:rgb(3,47,98)">"</span></span>: <span class="m_7523955012696232573m_-5232613197006588396gmail-pl-s" style="box-sizing:border-box;color:rgb(3,47,98)"><span class="m_7523955012696232573m_-5232613197006588396gmail-pl-pds" style="box-sizing:border-box;color:rgb(3,47,98)">"</span>2018-06-28T14:54:51Z<span class="m_7523955012696232573m_-5232613197006588396gmail-pl-pds" style="box-sizing:border-box;color:rgb(3,47,98)">"</span></span></td></tr><tr style="box-sizing:border-box"><td id="m_7523955012696232573m_-5232613197006588396gmail-L7" class="m_7523955012696232573m_-5232613197006588396gmail-blob-num m_7523955012696232573m_-5232613197006588396gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;width:50px;min-width:50px;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;line-height:20px;color:rgba(27,31,35,0.3);text-align:right;white-space:nowrap;vertical-align:top"></td><td id="m_7523955012696232573m_-5232613197006588396gmail-LC7" class="m_7523955012696232573m_-5232613197006588396gmail-blob-code m_7523955012696232573m_-5232613197006588396gmail-blob-code-inner m_7523955012696232573m_-5232613197006588396gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;color:rgb(36,41,46);word-wrap:normal;white-space:pre-wrap"> },</td></tr><tr style="box-sizing:border-box"><td id="m_7523955012696232573m_-5232613197006588396gmail-L8" class="m_7523955012696232573m_-5232613197006588396gmail-blob-num m_7523955012696232573m_-5232613197006588396gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;width:50px;min-width:50px;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;line-height:20px;color:rgba(27,31,35,0.3);text-align:right;white-space:nowrap;vertical-align:top"></td><td id="m_7523955012696232573m_-5232613197006588396gmail-LC8" class="m_7523955012696232573m_-5232613197006588396gmail-blob-code m_7523955012696232573m_-5232613197006588396gmail-blob-code-inner m_7523955012696232573m_-5232613197006588396gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;color:rgb(36,41,46);word-wrap:normal;white-space:pre-wrap"> <span class="m_7523955012696232573m_-5232613197006588396gmail-pl-s" style="box-sizing:border-box;color:rgb(3,47,98)"><span class="m_7523955012696232573m_-5232613197006588396gmail-pl-pds" style="box-sizing:border-box;color:rgb(3,47,98)">"</span>model<span class="m_7523955012696232573m_-5232613197006588396gmail-pl-pds" style="box-sizing:border-box;color:rgb(3,47,98)">"</span></span>: <span class="m_7523955012696232573m_-5232613197006588396gmail-pl-s" style="box-sizing:border-box;color:rgb(3,47,98)"><span class="m_7523955012696232573m_-5232613197006588396gmail-pl-pds" style="box-sizing:border-box;color:rgb(3,47,98)">"</span>tastypie.apikey<span class="m_7523955012696232573m_-5232613197006588396gmail-pl-pds" style="box-sizing:border-box;color:rgb(3,47,98)">"</span></span>,</td></tr><tr style="box-sizing:border-box"><td id="m_7523955012696232573m_-5232613197006588396gmail-L9" class="m_7523955012696232573m_-5232613197006588396gmail-blob-num m_7523955012696232573m_-5232613197006588396gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;width:50px;min-width:50px;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;line-height:20px;color:rgba(27,31,35,0.3);text-align:right;white-space:nowrap;vertical-align:top"></td><td id="m_7523955012696232573m_-5232613197006588396gmail-LC9" class="m_7523955012696232573m_-5232613197006588396gmail-blob-code m_7523955012696232573m_-5232613197006588396gmail-blob-code-inner m_7523955012696232573m_-5232613197006588396gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;color:rgb(36,41,46);word-wrap:normal;white-space:pre-wrap"> <span class="m_7523955012696232573m_-5232613197006588396gmail-pl-s" style="box-sizing:border-box;color:rgb(3,47,98)"><span class="m_7523955012696232573m_-5232613197006588396gmail-pl-pds" style="box-sizing:border-box;color:rgb(3,47,98)">"</span>pk<span class="m_7523955012696232573m_-5232613197006588396gmail-pl-pds" style="box-sizing:border-box;color:rgb(3,47,98)">"</span></span>: <span class="m_7523955012696232573m_-5232613197006588396gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,92,197)">1</span></td></tr><tr style="box-sizing:border-box"><td id="m_7523955012696232573m_-5232613197006588396gmail-L10" class="m_7523955012696232573m_-5232613197006588396gmail-blob-num m_7523955012696232573m_-5232613197006588396gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;width:50px;min-width:50px;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;line-height:20px;color:rgba(27,31,35,0.3);text-align:right;white-space:nowrap;vertical-align:top"></td><td id="m_7523955012696232573m_-5232613197006588396gmail-LC10" class="m_7523955012696232573m_-5232613197006588396gmail-blob-code m_7523955012696232573m_-5232613197006588396gmail-blob-code-inner m_7523955012696232573m_-5232613197006588396gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;color:rgb(36,41,46);word-wrap:normal;white-space:pre-wrap"> }</td></tr><tr style="box-sizing:border-box"><td id="m_7523955012696232573m_-5232613197006588396gmail-L11" class="m_7523955012696232573m_-5232613197006588396gmail-blob-num m_7523955012696232573m_-5232613197006588396gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;width:50px;min-width:50px;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;line-height:20px;color:rgba(27,31,35,0.3);text-align:right;white-space:nowrap;vertical-align:top"></td><td id="m_7523955012696232573m_-5232613197006588396gmail-LC11" class="m_7523955012696232573m_-5232613197006588396gmail-blob-code m_7523955012696232573m_-5232613197006588396gmail-blob-code-inner m_7523955012696232573m_-5232613197006588396gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;color:rgb(36,41,46);word-wrap:normal;white-space:pre-wrap">]
</td></tr></tbody></table><br></div><div>and then use such key to your calls to geonode api systems. The code responsible for this should be here:</div><div><br></div><div><a href="https://github.com/GeoNode/geonode/blob/master/geonode/api/authorization.py#L80" target="_blank">https://github.com/GeoNode/geonode/blob/master/geonode/api/authorization.py#L80</a></div><div><br></div><div>Please see the PR which provided it <a href="https://github.com/GeoNode/geonode/pull/3415" target="_blank">https://github.com/GeoNode/geonode/pull/3415</a>, is it enough for your use case? </div></div><br><div class="gmail_quote"><div dir="ltr">Il giorno mer 15 ago 2018 alle ore 05:58 Gus MacAulay <<a href="mailto:gusmacaulay@gmail.com" target="_blank">gusmacaulay@gmail.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi List,<div><br></div><div>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?</div><div><br></div><div>Regards</div><div>Gus</div></div>
_______________________________________________<br>
geonode-users mailing list<br>
<a href="mailto:geonode-users@lists.osgeo.org" target="_blank">geonode-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/geonode-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/geonode-users</a><br>
</blockquote></div>
</blockquote></div>
</blockquote></div>