John,
Thanks for that hint. Here is what I finally used.
auth_mgr = QgsApplication.authManager()
conf_map = auth_mgr.availableAuthMethodConfigs()
for key in conf_map.keys():
name = conf_map[key].name()
print( key )
print( name )
So that gives me both the authentication id and its name. Thanks so much.
Calvin
On Mon, Feb 3, 2020 at 6:24 AM John Gitau <[email protected]> wrote:
> 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 <[email protected]>
> 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
>> [email protected]
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer