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¶
- 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:
Trueif the storage was added,Falseif 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
idfrom the registry.- Return type:
bool
- Returns:
Trueif the storage was removed,Falseif 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
idorNoneif not found in the registry.- Parameters:
id (Optional[str]) – The id of the storage to retrieve
- Return type:
Optional[QgsAuthConfigurationStorage]
- signal storageAdded[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- signal storageChanged[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- signal storageRemoved[source]¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- storages(self) List[QgsAuthConfigurationStorage]¶
Returns the list of all registered authentication configuration storages.
- Return type: