Widget for entering authentication credentials both in the form username/password and by using QGIS Authentication Database and its authentication configurations.
More...
#include <qgsauthsettingswidget.h>
|
enum | WarningType { ProjectFile
, UserSettings
} |
| The WarningType enum is used to determine the text of the message shown to the user about the destination of the stored clear-text credentials from the "Basic" tab: depending on the provider or the settings, the credentials are stored in the user settings and/or in the project file. More...
|
|
|
bool | convertToEncrypted () |
| convertToEncrypted is called when the convert to encrypted button is clicked and it creates a Basic authentication configuration from username and password specified in the Basic tab More...
|
|
Widget for entering authentication credentials both in the form username/password and by using QGIS Authentication Database and its authentication configurations.
The widget also offers the functionality to convert username/password credentials to an authentication configuration.
- Since
- QGIS 3.0
Definition at line 36 of file qgsauthsettingswidget.h.
◆ WarningType
The WarningType enum is used to determine the text of the message shown to the user about the destination of the stored clear-text credentials from the "Basic" tab: depending on the provider or the settings, the credentials are stored in the user settings and/or in the project file.
Enumerator |
---|
ProjectFile | |
UserSettings | |
Definition at line 50 of file qgsauthsettingswidget.h.
◆ QgsAuthSettingsWidget()
QgsAuthSettingsWidget::QgsAuthSettingsWidget |
( |
QWidget * |
parent = nullptr , |
|
|
const QString & |
configId = QString() , |
|
|
const QString & |
username = QString() , |
|
|
const QString & |
password = QString() , |
|
|
const QString & |
dataprovider = QString() |
|
) |
| |
|
explicit |
Create a dialog for setting an associated authentication config, either from existing configs, or creating/removing them from auth database.
- Parameters
-
parent | Parent widget |
configId | authentication configuration id |
username | |
password | |
dataprovider | The key of the calling layer provider, if applicable |
Definition at line 23 of file qgsauthsettingswidget.cpp.
◆ btnConvertToEncryptedIsEnabled()
bool QgsAuthSettingsWidget::btnConvertToEncryptedIsEnabled |
( |
| ) |
const |
convertButtonEnabled, mainly useful for unit tests
- Returns
true
if the convert button is enabled
Definition at line 125 of file qgsauthsettingswidget.cpp.
◆ configId()
QString QgsAuthSettingsWidget::configId |
( |
| ) |
const |
◆ configIdChanged
void QgsAuthSettingsWidget::configIdChanged |
( |
| ) |
|
|
signal |
Emitted when the auth configuration ID selected in the dialog is changed.
- Since
- QGIS 3.22
◆ configurationTabIsSelected()
bool QgsAuthSettingsWidget::configurationTabIsSelected |
( |
| ) |
|
configurationTabIsSelected
- Returns
true
if the configuration tab is the currently selected tab
Definition at line 164 of file qgsauthsettingswidget.cpp.
◆ convertToEncrypted
bool QgsAuthSettingsWidget::convertToEncrypted |
( |
| ) |
|
|
slot |
convertToEncrypted is called when the convert to encrypted button is clicked and it creates a Basic authentication configuration from username and password specified in the Basic tab
- Returns
- return
true
on success
Definition at line 169 of file qgsauthsettingswidget.cpp.
◆ dataprovider()
QString QgsAuthSettingsWidget::dataprovider |
( |
| ) |
const |
dataprovider
- Returns
- the data provider key used to filter compatible authentication configurations
Definition at line 102 of file qgsauthsettingswidget.cpp.
◆ formattedWarning()
QString QgsAuthSettingsWidget::formattedWarning |
( |
WarningType |
warning | ) |
|
|
static |
warning text message based upon where credentials are stored
- Parameters
-
warning | enum of warning type |
- Returns
- pre-formatted warning text
Definition at line 107 of file qgsauthsettingswidget.cpp.
◆ password()
QString QgsAuthSettingsWidget::password |
( |
| ) |
const |
◆ passwordChanged
void QgsAuthSettingsWidget::passwordChanged |
( |
| ) |
|
|
signal |
Emitted when the plain text password defined in the dialog is changed.
- Since
- QGIS 3.22
◆ setBasicText()
void QgsAuthSettingsWidget::setBasicText |
( |
const QString & |
basicText | ) |
|
setBasicText set the text of the warning label
- Parameters
-
basicText | the text of the basic tab label |
Definition at line 61 of file qgsauthsettingswidget.cpp.
◆ setConfigId()
void QgsAuthSettingsWidget::setConfigId |
( |
const QString & |
configId | ) |
|
setConfigId set the authentication configuration id param configId the authentication configuration id
Definition at line 90 of file qgsauthsettingswidget.cpp.
◆ setDataprovider()
void QgsAuthSettingsWidget::setDataprovider |
( |
const QString & |
dataprovider | ) |
|
setDataprovider set the data provider key for filtering compatible authentication configurations
- Parameters
-
dataprovider | data provider key |
Definition at line 96 of file qgsauthsettingswidget.cpp.
◆ setPassword()
void QgsAuthSettingsWidget::setPassword |
( |
const QString & |
password | ) |
|
◆ setStorePasswordChecked()
void QgsAuthSettingsWidget::setStorePasswordChecked |
( |
bool |
checked | ) |
|
◆ setStoreUsernameChecked()
void QgsAuthSettingsWidget::setStoreUsernameChecked |
( |
bool |
checked | ) |
|
◆ setUsername()
void QgsAuthSettingsWidget::setUsername |
( |
const QString & |
username | ) |
|
◆ setWarningText()
void QgsAuthSettingsWidget::setWarningText |
( |
const QString & |
warningText | ) |
|
◆ showStoreCheckboxes()
void QgsAuthSettingsWidget::showStoreCheckboxes |
( |
bool |
enabled | ) |
|
showStoreCheckboxes show the "Store" checkboxes for basic auth.
Some connection configurations allow the user to enter credentials for testing the connection without storing them in the project. "Store" checkboxes are disabled by default.
- Parameters
-
Definition at line 130 of file qgsauthsettingswidget.cpp.
◆ storePasswordIsChecked()
bool QgsAuthSettingsWidget::storePasswordIsChecked |
( |
| ) |
const |
◆ storeUsernameIsChecked()
bool QgsAuthSettingsWidget::storeUsernameIsChecked |
( |
| ) |
const |
◆ username()
QString QgsAuthSettingsWidget::username |
( |
| ) |
const |
◆ usernameChanged
void QgsAuthSettingsWidget::usernameChanged |
( |
| ) |
|
|
signal |
Emitted when the plain text username defined in the dialog is changed.
- Since
- QGIS 3.22
The documentation for this class was generated from the following files: