QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
Public Types | Public Member Functions | Static Public Member Functions | List of all members
QgsAuthMethodRegistry Class Reference

A registry / canonical manager of authentication methods. More...

#include <qgsauthmethodregistry.h>

Public Types

typedef std::map< QString, QgsAuthMethodMetadata * > AuthMethods
 Type for auth method metadata associative container. More...
 

Public Member Functions

virtual ~QgsAuthMethodRegistry ()
 Virtual dectructor. More...
 
QgsAuthMethodauthMethod (const QString &authMethodKey)
 Create an instance of the auth method. More...
 
QLibraryauthMethodLibrary (const QString &authMethodKey) const
 Return the library object associated with an auth method key. More...
 
QStringList authMethodList () const
 Return list of available auth methods by their keys. More...
 
const QgsAuthMethodMetadataauthMethodMetadata (const QString &authMethodKey) const
 Return metadata of the auth method or nullptr if not found. More...
 
QWidgeteditWidget (const QString &authMethodKey, QWidget *parent=nullptr)
 Return the auth method capabilities. More...
 
void * function (const QString &authMethodKey, const QString &functionName)
 Get pointer to auth method function. More...
 
QString library (const QString &authMethodKey) const
 Return path for the library of the auth method. More...
 
const QDirlibraryDirectory () const
 Return library directory where plugins are found. More...
 
QString pluginList (bool asHtml=false) const
 Return list of auth method plugins found. More...
 
void setLibraryDirectory (const QDir &path)
 Set library directory where to search for plugins. More...
 

Static Public Member Functions

static QgsAuthMethodRegistryinstance (const QString &pluginPath=QString::null)
 Means of accessing canonical single instance. More...
 

Detailed Description

A registry / canonical manager of authentication methods.

This is a Singleton class that manages authentication method plugin access.

Loaded auth methods may be restricted using QGIS_AUTHMETHOD_FILE environment variable. QGIS_AUTHMETHOD_FILE is regexp pattern applied to auth method file name (not auth method key). For example, if the variable is set to basic|pkipaths it will load only auth methods basic, and pkipaths.

Note
not available in Python bindings

Definition at line 42 of file qgsauthmethodregistry.h.

Member Typedef Documentation

◆ AuthMethods

Type for auth method metadata associative container.

Definition at line 111 of file qgsauthmethodregistry.h.

Constructor & Destructor Documentation

◆ ~QgsAuthMethodRegistry()

QgsAuthMethodRegistry::~QgsAuthMethodRegistry ( )
virtual

Virtual dectructor.

Definition at line 148 of file qgsauthmethodregistry.cpp.

Member Function Documentation

◆ authMethod()

QgsAuthMethod * QgsAuthMethodRegistry::authMethod ( const QString authMethodKey)

Create an instance of the auth method.

Parameters
authMethodKeyidentificator of the auth method
Returns
instance of auth method or nullptr on error

Definition at line 263 of file qgsauthmethodregistry.cpp.

◆ authMethodLibrary()

QLibrary * QgsAuthMethodRegistry::authMethodLibrary ( const QString authMethodKey) const

Return the library object associated with an auth method key.

Definition at line 365 of file qgsauthmethodregistry.cpp.

◆ authMethodList()

QStringList QgsAuthMethodRegistry::authMethodList ( ) const

Return list of available auth methods by their keys.

Definition at line 381 of file qgsauthmethodregistry.cpp.

◆ authMethodMetadata()

const QgsAuthMethodMetadata * QgsAuthMethodRegistry::authMethodMetadata ( const QString authMethodKey) const

Return metadata of the auth method or nullptr if not found.

Definition at line 391 of file qgsauthmethodregistry.cpp.

◆ editWidget()

QWidget * QgsAuthMethodRegistry::editWidget ( const QString authMethodKey,
QWidget parent = nullptr 
)

Return the auth method capabilities.

Parameters
authMethodKeyidentificator of the auth method Return the GUI edit widget associated with the auth method
parentParent widget
authMethodKeyidentificator of the auth method

Definition at line 316 of file qgsauthmethodregistry.cpp.

◆ function()

void * QgsAuthMethodRegistry::function ( const QString authMethodKey,
const QString functionName 
)

Get pointer to auth method function.

Parameters
authMethodKeyidentificator of the auth method
functionNamename of function
Returns
pointer to function or nullptr on error

Definition at line 346 of file qgsauthmethodregistry.cpp.

◆ instance()

QgsAuthMethodRegistry * QgsAuthMethodRegistry::instance ( const QString pluginPath = QString::null)
static

Means of accessing canonical single instance.

Definition at line 38 of file qgsauthmethodregistry.cpp.

◆ library()

QString QgsAuthMethodRegistry::library ( const QString authMethodKey) const

Return path for the library of the auth method.

Definition at line 192 of file qgsauthmethodregistry.cpp.

◆ libraryDirectory()

const QDir & QgsAuthMethodRegistry::libraryDirectory ( ) const

Return library directory where plugins are found.

Definition at line 249 of file qgsauthmethodregistry.cpp.

◆ pluginList()

QString QgsAuthMethodRegistry::pluginList ( bool  asHtml = false) const

Return list of auth method plugins found.

Definition at line 204 of file qgsauthmethodregistry.cpp.

◆ setLibraryDirectory()

void QgsAuthMethodRegistry::setLibraryDirectory ( const QDir path)

Set library directory where to search for plugins.

Definition at line 254 of file qgsauthmethodregistry.cpp.


The documentation for this class was generated from the following files: