QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
17 #ifndef QGSAUTHMETHOD_H
18 #define QGSAUTHMETHOD_H
22 #include <QNetworkReply>
23 #include <QNetworkRequest>
24 #include <QStringList>
26 #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
29 #include <QRecursiveMutex>
32 #include "qgsconfig.h"
33 #include "qgis_core.h"
62 GenericDataSourceUri = 0x8,
64 All = NetworkRequest | NetworkReply | DataSourceUri | GenericDataSourceUri | NetworkProxy
66 Q_DECLARE_FLAGS( Expansions, Expansion )
69 virtual QString key()
const = 0;
72 virtual QString description()
const = 0;
75 virtual QString displayDescription()
const = 0;
88 virtual QWidget *editWidget( QWidget *parent )
const;
114 const QString &dataprovider = QString() )
118 Q_UNUSED( dataprovider )
131 const QString &dataprovider = QString() )
135 Q_UNUSED( dataprovider )
148 const QString &dataprovider = QString() )
150 Q_UNUSED( connectionItems )
152 Q_UNUSED( dataprovider )
165 const QString &dataprovider = QString() )
169 Q_UNUSED( dataprovider )
179 virtual void clearCachedConfig(
const QString &authcfg ) = 0;
196 static QString
authMethodTag() {
return QObject::tr(
"Authentication method" ); }
202 void setExpansions( QgsAuthMethod::Expansions expansions ) { mExpansions = expansions; }
204 void setDataProviders(
const QStringList &dataproviders ) { mDataProviders = dataproviders; }
206 QgsAuthMethod::Expansions mExpansions = QgsAuthMethod::Expansions();
209 #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
219 #endif // QGSAUTHMETHOD_H
Abstract base class for authentication method plugins.
virtual bool updateNetworkRequest(QNetworkRequest &request, const QString &authcfg, const QString &dataprovider=QString())
Update a network request with authentication components.
QHash< QString, QgsAuthMethod * > QgsAuthMethodsMap
QStringList supportedDataProviders() const
The data providers that the method supports, allowing for filtering out authcfgs that are not applica...
void setVersion(int version)
Sets the version of the auth method (useful for future upgrading)
static QString authMethodTag()
Tag signifying that this is an authentcation method (e.g. for use as title in message log panel outpu...
virtual bool updateNetworkProxy(QNetworkProxy &proxy, const QString &authcfg, const QString &dataprovider=QString())
Update proxy settings with authentication components.
void setExpansions(QgsAuthMethod::Expansions expansions)
Sets the support expansions (points in providers where the authentication is injected) of the auth me...
QStringList mDataProviders
void setDataProviders(const QStringList &dataproviders)
Sets list of data providers this auth method supports.
virtual bool updateDataSourceUriItems(QStringList &connectionItems, const QString &authcfg, const QString &dataprovider=QString())
Update data source connection items with authentication components.
virtual bool updateNetworkReply(QNetworkReply *reply, const QString &authcfg, const QString &dataprovider=QString())
Update a network reply with authentication components.
Expansion
Flags that represent the update points (where authentication configurations are expanded) supported b...
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsField::ConfigurationFlags) CORE_EXPORT QDataStream &operator<<(QDataStream &out
Writes the field to stream out. QGIS version compatibility is not guaranteed.
#define SIP_IF_FEATURE(feature)
QgsAuthMethod::Expansions supportedExpansions() const
Flags that represent the update points (where authentication configurations are expanded) supported b...
int version() const
Increment this if method is significantly updated, allow updater code to be written for previously st...
Configuration storage class for authentication method configurations.