17 #ifndef QGSAUTHMETHOD_H 18 #define QGSAUTHMETHOD_H 22 #include <QNetworkReply> 23 #include <QNetworkRequest> 24 #include <QStringList> 52 GenericDataSourceURI = 0x8,
53 All = NetworkRequest | NetworkReply | DataSourceURI | GenericDataSourceURI
60 virtual QString key()
const = 0;
63 virtual QString description()
const = 0;
66 virtual QString displayDescription()
const = 0;
94 Q_UNUSED( dataprovider )
110 Q_UNUSED( dataprovider )
124 Q_UNUSED( connectionItems )
126 Q_UNUSED( dataprovider )
135 virtual void clearCachedConfig(
const QString &authcfg ) = 0;
160 void setExpansions(
const QgsAuthMethod::Expansions& expansions ) { mExpansions = expansions; }
168 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsAuthMethod::Expansions )
172 #endif // QGSAUTHMETHOD_H int version() const
Increment this if method is significantly updated, allow updater code to be written for previously st...
QStringList mDataProviders
virtual bool updateDataSourceUriItems(QStringList &connectionItems, const QString &authcfg, const QString &dataprovider=QString())
Update data source connection items with authentication components.
static QString authMethodTag()
Tag signifying that this is an authentcation method (e.g.
QString tr(const char *sourceText, const char *disambiguation, int n)
QgsAuthMethod()
Construct a default authentication method.
virtual bool updateNetworkRequest(QNetworkRequest &request, const QString &authcfg, const QString &dataprovider=QString())
Update a network request with authentication components.
Expansion
Flags that represent the update points (where authentication configurations are expanded) supported b...
void setDataProviders(const QStringList &dataproviders)
Set list of data providers this auth method supports.
QgsAuthMethod::Expansions mExpansions
Configuration storage class for authentication method configurations.
QStringList supportedDataProviders() const
The data providers that the method supports, allowing for filtering out authcfgs that are not applica...
Abstract base class for authentication method plugins.
void setVersion(int version)
Set the version of the auth method (useful for future upgrading)
virtual bool updateNetworkReply(QNetworkReply *reply, const QString &authcfg, const QString &dataprovider=QString())
Update a network reply with authentication components.
void setExpansions(const QgsAuthMethod::Expansions &expansions)
Set the support expansions (points in providers where the authentication is injected) of the auth met...
QgsAuthMethod::Expansions supportedExpansions() const
Flags that represent the update points (where authentication configurations are expanded) supported b...