17#ifndef QGSAUTHMETHOD_H
18#define QGSAUTHMETHOD_H
26#include <QNetworkReply>
27#include <QNetworkRequest>
29#include <QRecursiveMutex>
66 virtual QString
key() const = 0;
85 virtual QWidget *editWidget( QWidget *parent )
const;
111 const QString &dataprovider = QString() )
115 Q_UNUSED( dataprovider )
128 const QString &dataprovider = QString() )
132 Q_UNUSED( dataprovider )
145 const QString &dataprovider = QString() )
147 Q_UNUSED( connectionItems )
149 Q_UNUSED( dataprovider )
162 const QString &dataprovider = QString() )
166 Q_UNUSED( dataprovider )
193 static QString
authMethodTag() {
return QObject::tr(
"Authentication method" ); }
Configuration storage class for authentication method configurations.
Abstract base class for authentication method plugins.
virtual QString description() const =0
A non-translated short description representing the auth method for use in debug output and About dia...
int version() const
Increment this if method is significantly updated, allow updater code to be written for previously st...
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...
virtual QString displayDescription() const =0
Translatable display version of the 'description()'.
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.
QgsAuthMethod()
Construct a default authentication method.
QgsAuthMethod::Expansions mExpansions
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...
virtual QString key() const =0
A non-translated short name representing the auth method.
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