Class: QgsAuthConfigurationStorageRegistry¶
Registry for authentication configuration storages.
This singleton class manages a list of authentication configuration storages.
QgsAuthConfigurationStorageRegistry
is not usually directly
created, but rather accessed through
QgsApplication.authConfigurationStorageRegistry()
.
Added in version 3.40.
Class Hierarchy¶
Base classes¶
Methods
Add an authentication configuration storage to the registry. |
|
Returns the first ready (and enabled) authentication configuration storage which has the required capability. |
|
Returns the list of all ready (and enabled) authentication configuration storage. |
|
Returns the list of all ready (and enabled) authentication configuration storage with the required capability. |
|
Remove the authentication configuration storage identified by id from the registry. |
|
Order the storages by the specified orderIds. |
|
Returns the storage with the specified id or |
|
Returns the list of all registered authentication configuration storages. |
Signals
Emitted after a storage was added |
|
Emitted after a storage was changed |
|
Emitted after a storage was removed |
- class qgis.core.QgsAuthConfigurationStorageRegistry[source]¶
Bases:
QObject
- __init__()
Creates a new QgsAuthConfigurationStorageRegistry instance.
- addStorage(self, storage: QgsAuthConfigurationStorage | None) bool [source]¶
Add an authentication configuration storage to the registry. The registry takes ownership of the storage object.
- Parameters:
storage (Optional[QgsAuthConfigurationStorage]) – The storage to add
- Return type:
bool
- Returns:
True
if the storage was added,False
if it was already present in the registry.
Note
The storage object must have a unique id.
Note
This method must be called from the same thread the registry was created in.
- firstReadyStorageWithCapability(self, capability: Qgis.AuthConfigurationStorageCapability) QgsAuthConfigurationStorage | None [source]¶
Returns the first ready (and enabled) authentication configuration storage which has the required capability.
- Parameters:
capability (Qgis.AuthConfigurationStorageCapability) – The capability to look for
- Return type:
Optional[QgsAuthConfigurationStorage]
- readyStorages(self) List[QgsAuthConfigurationStorage] ¶
Returns the list of all ready (and enabled) authentication configuration storage.
- Return type:
- readyStoragesWithCapability(self, capability: Qgis.AuthConfigurationStorageCapability) List[QgsAuthConfigurationStorage] ¶
Returns the list of all ready (and enabled) authentication configuration storage with the required capability.
- Parameters:
capability (Qgis.AuthConfigurationStorageCapability) – The capability to look for
- Return type:
- removeStorage(self, id: str | None) bool [source]¶
Remove the authentication configuration storage identified by
id
from the registry.- Return type:
bool
- Returns:
True
if the storage was removed,False
if it was not present in the registry.
Note
This method must be called from the same thread the registry was created in.
Note
The storage will be deleted.
- Parameters:
id (Optional[str])
- setStorageOrder(self, orderIds: Iterable[str | None])[source]¶
Order the storages by the specified
orderIds
.- Parameters:
orderIds (Iterable[Optional[str]]) – The ordered list of storage Ids to apply, storages not in the list will be appended at the end.
Note
This method must be called from the same thread the registry was created in.
- storage(self, id: str | None) QgsAuthConfigurationStorage | None [source]¶
Returns the storage with the specified
id
orNone
if not found in the registry.- Parameters:
id (Optional[str]) – The id of the storage to retrieve
- Return type:
Optional[QgsAuthConfigurationStorage]
- signal storageAdded(id: str)[source]¶
Emitted after a storage was added
- Parameters:
id (str) – The id of the added storage
- signal storageChanged(id: str)[source]¶
Emitted after a storage was changed
- Parameters:
id (str) – The id of the changed storage
- signal storageRemoved(id: str)[source]¶
Emitted after a storage was removed
- Parameters:
id (str) – The id of the removed storage
- storages(self) List[QgsAuthConfigurationStorage] ¶
Returns the list of all registered authentication configuration storages.
- Return type: