Re: [QGIS-Developer] Use of QgsAuthManager

2018-03-05 Thread Alessandro Pasotti
Hi Richard, 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. Also, store the

Re: [QGIS-Developer] Use of QgsAuthManager

2018-03-05 Thread Richard Duivenvoorde
On 05-03-18 13:10, Alessandro Pasotti wrote: > > from python you can call: > > QgsApplication.instance().authManager() Ah, thanks Ale, got that working; ... if I have a Authentication Configuration in my config with given key. Is there (still) a way to force users to give username/password,

Re: [QGIS-Developer] Use of QgsAuthManager

2018-03-05 Thread Alessandro Pasotti
from python you can call: QgsApplication.instance().authManager() On Mon, Mar 5, 2018 at 1:04 PM, Richard Duivenvoorde wrote: > Hi Devs, > > Starting with a QGIS3 plugin which needs to retrieve data from REST > server with a simple Basic Authentication scheme. > > Looking

[QGIS-Developer] Use of QgsAuthManager

2018-03-05 Thread Richard Duivenvoorde
Hi Devs, Starting with a QGIS3 plugin which needs to retrieve data from REST server with a simple Basic Authentication scheme. Looking into: https://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/authentication.html#term-authentication-method But this is old code, eg: