Skip to content

Commit

Permalink
follow-up
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Jun 23, 2021
1 parent 019976e commit fb97e8f
Show file tree
Hide file tree
Showing 10 changed files with 81 additions and 181 deletions.
40 changes: 4 additions & 36 deletions src/auth/esritoken/core/qgsauthesritokenmethod.cpp
Expand Up @@ -132,42 +132,10 @@ void QgsAuthEsriTokenMethod::removeMethodConfig( const QString &authcfg )
// Plugin externals
//////////////////////////////////////////////

/**
* Required class factory to return a pointer to a newly created object
*/
QGISEXTERN QgsAuthEsriTokenMethod *classFactory()
{
return new QgsAuthEsriTokenMethod();
}

/**
* Required key function (used to map the plugin to a data store type)
*/
QGISEXTERN QString authMethodKey()
{
return AUTH_METHOD_KEY;
}

/**
* Required description function
*/
QGISEXTERN QString description()
{
return AUTH_METHOD_DESCRIPTION;
}

/**
* Required isAuthMethod function. Used to determine if this shared library
* is an authentication method plugin
*/
QGISEXTERN bool isAuthMethod()
{
return true;
}

/**
* Required cleanup function
*/
QGISEXTERN void cleanupAuthMethod() // pass QgsAuthMethod *method, then delete method ?
#ifndef HAVE_STATIC_PROVIDERS
QGISEXTERN QgsAuthMethodMetadata *authMethodMetadataFactory()
{
return new QgsAuthEsriTokenMethodMetadata();
}
#endif
12 changes: 12 additions & 0 deletions src/auth/esritoken/core/qgsauthesritokenmethod.h
Expand Up @@ -22,6 +22,7 @@

#include "qgsauthconfig.h"
#include "qgsauthmethod.h"
#include "qgsauthmethodmetadata.h"


class QgsAuthEsriTokenMethod : public QgsAuthMethod
Expand Down Expand Up @@ -57,4 +58,15 @@ class QgsAuthEsriTokenMethod : public QgsAuthMethod

};


class QgsAuthEsriTokenMethodMetadata : public QgsAuthMethodMetadata
{
public:
QgsAuthEsriTokenMethodMetadata()
: QgsAuthMethodMetadata( QgsAuthEsriTokenMethod::AUTH_METHOD_KEY, QgsAuthEsriTokenMethod::AUTH_METHOD_DESCRIPTION )
{}
QgsAuthEsriTokenMethod *createAuthMethod() const override {return new QgsAuthEsriTokenMethod;}
//QStringList supportedDataProviders() const override;
};

#endif // QGSAUTHESRITOKENMETHOD_H
40 changes: 4 additions & 36 deletions src/auth/identcert/core/qgsauthidentcertmethod.cpp
Expand Up @@ -294,42 +294,10 @@ void QgsAuthIdentCertMethod::removePkiConfigBundle( const QString &authcfg )
// Plugin externals
//////////////////////////////////////////////

/**
* Required class factory to return a pointer to a newly created object
*/
QGISEXTERN QgsAuthIdentCertMethod *classFactory()
{
return new QgsAuthIdentCertMethod();
}

/**
* Required key function (used to map the plugin to a data store type)
*/
QGISEXTERN QString authMethodKey()
{
return AUTH_METHOD_KEY;
}

/**
* Required description function
*/
QGISEXTERN QString description()
{
return AUTH_METHOD_DESCRIPTION;
}

/**
* Required isAuthMethod function. Used to determine if this shared library
* is an authentication method plugin
*/
QGISEXTERN bool isAuthMethod()
{
return true;
}

/**
* Required cleanup function
*/
QGISEXTERN void cleanupAuthMethod() // pass QgsAuthMethod *method, then delete method ?
#ifndef HAVE_STATIC_PROVIDERS
QGISEXTERN QgsAuthMethodMetadata *authMethodMetadataFactory()
{
return new QgsAuthIdentCertMethodMetadata();
}
#endif
12 changes: 12 additions & 0 deletions src/auth/identcert/core/qgsauthidentcertmethod.h
Expand Up @@ -22,6 +22,7 @@

#include "qgsauthconfig.h"
#include "qgsauthmethod.h"
#include "qgsauthmethodmetadata.h"


class QgsAuthIdentCertMethod : public QgsAuthMethod
Expand Down Expand Up @@ -63,4 +64,15 @@ class QgsAuthIdentCertMethod : public QgsAuthMethod

};


class QgsAuthIdentCertMethodMetadata : public QgsAuthMethodMetadata
{
public:
QgsAuthIdentCertMethodMetadata()
: QgsAuthMethodMetadata( QgsAuthIdentCertMethod::AUTH_METHOD_KEY, QgsAuthIdentCertMethod::AUTH_METHOD_DESCRIPTION )
{}
QgsAuthIdentCertMethod *createAuthMethod() const override {return new QgsAuthIdentCertMethod;}
//QStringList supportedDataProviders() const override;
};

#endif // QGSAUTHIDENTCERTMETHOD_H
40 changes: 4 additions & 36 deletions src/auth/oauth2/core/qgsauthoauth2method.cpp
Expand Up @@ -656,42 +656,10 @@ void QgsAuthOAuth2Method::removeOAuth2Bundle( const QString &authcfg )
// Plugin externals
//////////////////////////////////////////////

/**
* Required class factory to return a pointer to a newly created object
*/
QGISEXTERN QgsAuthOAuth2Method *classFactory()
{
return new QgsAuthOAuth2Method();
}

/**
* Required key function (used to map the plugin to a data store type)
*/
QGISEXTERN QString authMethodKey()
{
return AUTH_METHOD_KEY;
}

/**
* Required description function
*/
QGISEXTERN QString description()
{
return AUTH_METHOD_DESCRIPTION;
}

/**
* Required isAuthMethod function. Used to determine if this shared library
* is an authentication method plugin
*/
QGISEXTERN bool isAuthMethod()
{
return true;
}

/**
* Required cleanup function
*/
QGISEXTERN void cleanupAuthMethod() // pass QgsAuthMethod *method, then delete method ?
#ifndef HAVE_STATIC_PROVIDERS
QGISEXTERN QgsAuthMethodMetadata *authMethodMetadataFactory()
{
return new QgsAuthOAuth2cMethodMetadata();
}
#endif
12 changes: 12 additions & 0 deletions src/auth/oauth2/core/qgsauthoauth2method.h
Expand Up @@ -23,6 +23,7 @@
#include <QMutex>

#include "qgsauthmethod.h"
#include "qgsauthmethodmetadata.h"


class QgsO2;
Expand Down Expand Up @@ -116,4 +117,15 @@ class QgsAuthOAuth2Method : public QgsAuthMethod
#endif
};


class QgsAuthOAuth2MethodMetadata : public QgsAuthMethodMetadata
{
public:
QgsAuthOAuth2MethodMetadata()
: QgsAuthMethodMetadata( QgsAuthOAuth2Method::AUTH_METHOD_KEY, QgsAuthOAuth2Method::AUTH_METHOD_DESCRIPTION )
{}
QgsAuthOAuth2Method *createAuthMethod() const override {return new QgsAuthOAuth2Method;}
//QStringList supportedDataProviders() const override;
};

#endif // QGSAUTHOAUTH2METHOD_H
40 changes: 4 additions & 36 deletions src/auth/pkipaths/core/qgsauthpkipathsmethod.cpp
Expand Up @@ -330,42 +330,10 @@ void QgsAuthPkiPathsMethod::removePkiConfigBundle( const QString &authcfg )
// Plugin externals
//////////////////////////////////////////////

/**
* Required class factory to return a pointer to a newly created object
*/
QGISEXTERN QgsAuthPkiPathsMethod *classFactory()
{
return new QgsAuthPkiPathsMethod();
}

/**
* Required key function (used to map the plugin to a data store type)
*/
QGISEXTERN QString authMethodKey()
{
return AUTH_METHOD_KEY;
}

/**
* Required description function
*/
QGISEXTERN QString description()
{
return AUTH_METHOD_DESCRIPTION;
}

/**
* Required isAuthMethod function. Used to determine if this shared library
* is an authentication method plugin
*/
QGISEXTERN bool isAuthMethod()
{
return true;
}

/**
* Required cleanup function
*/
QGISEXTERN void cleanupAuthMethod() // pass QgsAuthMethod *method, then delete method ?
#ifndef HAVE_STATIC_PROVIDERS
QGISEXTERN QgsAuthMethodMetadata *authMethodMetadataFactory()
{
return new QgsAuthPkiPathsMethodMetadata();
}
#endif
13 changes: 13 additions & 0 deletions src/auth/pkipaths/core/qgsauthpkipathsmethod.h
Expand Up @@ -22,6 +22,7 @@

#include "qgsauthconfig.h"
#include "qgsauthmethod.h"
#include "qgsauthmethodmetadata.h"


class QgsAuthPkiPathsMethod : public QgsAuthMethod
Expand Down Expand Up @@ -63,4 +64,16 @@ class QgsAuthPkiPathsMethod : public QgsAuthMethod

};


class QgsAuthPkiPathsMethodMetadata : public QgsAuthMethodMetadata
{
public:
QgsAuthPkiPathsMethodMetadata()
: QgsAuthMethodMetadata( QgsAuthPkiPathsMethod::AUTH_METHOD_KEY, QgsAuthPkiPathsMethod::AUTH_METHOD_DESCRIPTION )
{}
QgsAuthPkiPathsMethod *createAuthMethod() const override {return new QgsAuthPkiPathsMethod;}
//QStringList supportedDataProviders() const override;
};


#endif // QGSAUTHPKIPATHSMETHOD_H
41 changes: 4 additions & 37 deletions src/auth/pkipkcs12/core/qgsauthpkcs12method.cpp
Expand Up @@ -345,47 +345,14 @@ void QgsAuthPkcs12Method::removePkiConfigBundle( const QString &authcfg )
}
}


//////////////////////////////////////////////
// Plugin externals
//////////////////////////////////////////////

/**
* Required class factory to return a pointer to a newly created object
*/
QGISEXTERN QgsAuthPkcs12Method *classFactory()
{
return new QgsAuthPkcs12Method();
}

/**
* Required key function (used to map the plugin to a data store type)
*/
QGISEXTERN QString authMethodKey()
{
return AUTH_METHOD_KEY;
}

/**
* Required description function
*/
QGISEXTERN QString description()
{
return AUTH_METHOD_DESCRIPTION;
}

/**
* Required isAuthMethod function. Used to determine if this shared library
* is an authentication method plugin
*/
QGISEXTERN bool isAuthMethod()
{
return true;
}

/**
* Required cleanup function
*/
QGISEXTERN void cleanupAuthMethod() // pass QgsAuthMethod *method, then delete method ?
#ifndef HAVE_STATIC_PROVIDERS
QGISEXTERN QgsAuthMethodMetadata *authMethodMetadataFactory()
{
return new QgsAuthPkcs12MethodMetadata();
}
#endif
12 changes: 12 additions & 0 deletions src/auth/pkipkcs12/core/qgsauthpkcs12method.h
Expand Up @@ -22,6 +22,7 @@

#include "qgsauthconfig.h"
#include "qgsauthmethod.h"
#include "qgsauthmethodmetadata.h"


class QgsAuthPkcs12Method : public QgsAuthMethod
Expand Down Expand Up @@ -64,4 +65,15 @@ class QgsAuthPkcs12Method : public QgsAuthMethod

};


class QgsAuthPkcs12MethodMetadata : public QgsAuthMethodMetadata
{
public:
QgsAuthPkcs12MethodMetadata()
: QgsAuthMethodMetadata( QgsAuthPkcs12Method::AUTH_METHOD_KEY, QgsAuthPkcs12Method::AUTH_METHOD_DESCRIPTION )
{}
QgsAuthPkcs12Method *createAuthMethod() const override {return new QgsAuthPkcs12Method;}
//QStringList supportedDataProviders() const override;
};

#endif // QGSAUTHPKCS12METHOD_H

0 comments on commit fb97e8f

Please sign in to comment.