[QGIS-Developer] Question on QGIS Authentication API

John Gitau gkahiu at gmail.com
Mon Feb 3 03:23:08 PST 2020


Hi Calvin,

You can retrieve the name from the base config object as follows:

auth_mgr = QgsApplication.authManager()
conf_map = auth_mgr.availableAuthMethodConfigs()
for id, conf in conf_map.iteritems():
    conf_name = conf.name()
    print conf_name

I hope this helps.

Cheers,

John

On Fri, Jan 31, 2020 at 11:11 PM C Hamilton <adenaculture at gmail.com> wrote:

> I can get a list of all of the authentication IDs in QGIS by these two
> lines of code.
>
> authMgr = QgsApplication.authManager()
> authIdList = authMgr.configIds()
>
> Starting from one of the authentication ids in the list I cannot seem to
> find out how to retrieve its associated name. It is probably simple, but I
> cannot find the right method to call. Does anyone know how to do it?
>
> Thanks,
>
> Calvin
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20200203/32db89ef/attachment.html>


More information about the QGIS-Developer mailing list