<div dir="ltr"><div><div><div><div>Hi Richard, <br><br></div>it's up to you, you can also create an authentication configuration programmatically from python, i.e. create a simple username/password dialog, check if the credentials are valid and then create an authentication configuration and store it in the authentication DB.<br><br></div>Also, store the authcfg id (not the credentials!) into your plugin settings and use that one for all subsequent calls.<br><br></div>There should be an example (for 2.x but the auth stuff has'n changed): <a href="https://github.com/boundlessgeo/lib-qgis-commons/blob/master/qgiscommons2/network/oauth2.py#L89">https://github.com/boundlessgeo/lib-qgis-commons/blob/master/qgiscommons2/network/oauth2.py#L89</a><br><br></div>In QGIS 3 all the auth GUI dialogs are wrapped in ptyhon so that you can use them directly.<br><br><div><div><div><br><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 5, 2018 at 2:09 PM, Richard Duivenvoorde <span dir="ltr"><<a href="mailto:rdmailings@duif.net" target="_blank">rdmailings@duif.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On <a href="tel:05-03-18%2013" value="+3905031813">05-03-18 13</a>:10, Alessandro Pasotti wrote:<br>
><br>
> from python you can call:<br>
><br>
> QgsApplication.instance().<wbr>authManager()<br>
<br>
</span>Ah, thanks Ale, got that working; ... if I have a Authentication<br>
Configuration in my config with given key.<br>
<br>
Is there (still) a way to force users to give username/password, and<br>
just use it for given session<br>
<br>
Or should the user always go through QgsAuthConfigSelect().show() to<br>
- first set a master keyword if not set yet on db<br>
- create a Authentication config by pressing the plus-sign?<br>
<br>
Isn't this dialog (see attached screenie) not to intimidating for<br>
average user?<br>
<br>
Thanks for given input.<br>
<br>
Regards,<br>
<br>
Richard<br>
<br>
<br>
<br>
<br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Alessandro Pasotti<br>w3:   <a href="http://www.itopen.it" target="_blank">www.itopen.it</a></div>
</div>