17#ifndef QGSAUTHMETHOD_H
18#define QGSAUTHMETHOD_H
22#include <QNetworkReply>
23#include <QNetworkRequest>
26#include <QRecursiveMutex>
58 GenericDataSourceUri = 0x8,
60 All = NetworkRequest | NetworkReply | DataSourceUri | GenericDataSourceUri | NetworkProxy
65 virtual QString key() const = 0;
68 virtual QString description() const = 0;
71 virtual QString displayDescription() const = 0;
74 int version()
const {
return mVersion; }
84 virtual QWidget *editWidget( QWidget *parent )
const;
110 const QString &dataprovider = QString() )
114 Q_UNUSED( dataprovider )
127 const QString &dataprovider = QString() )
131 Q_UNUSED( dataprovider )
144 const QString &dataprovider = QString() )
146 Q_UNUSED( connectionItems )
148 Q_UNUSED( dataprovider )
161 const QString &dataprovider = QString() )
165 Q_UNUSED( dataprovider )
192 static QString
authMethodTag() {
return QObject::tr(
"Authentication method" ); }
200 void setDataProviders(
const QStringList &dataproviders ) { mDataProviders = dataproviders; }
Configuration storage class for authentication method configurations.
Abstract base class for authentication method plugins.
virtual bool updateNetworkProxy(QNetworkProxy &proxy, const QString &authcfg, const QString &dataprovider=QString())
Update proxy settings with authentication components.
virtual bool updateNetworkRequest(QNetworkRequest &request, const QString &authcfg, const QString &dataprovider=QString())
Update a network request with authentication components.
QStringList mDataProviders
QgsAuthMethod::Expansions supportedExpansions() const
Flags that represent the update points (where authentication configurations are expanded) supported b...
void setExpansions(QgsAuthMethod::Expansions expansions)
Sets the support expansions (points in providers where the authentication is injected) of the auth me...
QStringList supportedDataProviders() const
The data providers that the method supports, allowing for filtering out authcfgs that are not applica...
virtual void clearCachedConfig(const QString &authcfg)=0
Clear any cached configuration.
virtual void updateMethodConfig(QgsAuthMethodConfig &mconfig)=0
Update an authentication configuration in place.
void setVersion(int version)
Sets 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.
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. for use as title in message log panel outpu...
QFlags< Expansion > Expansions
void setDataProviders(const QStringList &dataproviders)
Sets list of data providers this auth method supports.
Expansion
Flags that represent the update points (where authentication configurations are expanded) supported b...
#define SIP_ENUM_BASETYPE(type)
#define SIP_IF_FEATURE(feature)
QHash< QString, QgsAuthMethod * > QgsAuthMethodsMap
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsTextRendererUtils::CurvedTextFlags)