QtPdCom  1.5.2
LoginManager Class Reference

Class to handle the Authentication process. More...

#include <LoginManager.h>

Inheritance diagram for LoginManager:
Collaboration diagram for LoginManager:

Signals

void needCredentials ()
 Username and/or password has not been set.
void loginSuccessful ()
 Authentification was successful.
void loginFailed ()
 Authentification was not successful.

Public Member Functions

 LoginManager (QString server_name=QString(), QObject *parent=nullptr)
 ~LoginManager ()
Q_INVOKABLE void setAuthName (QString name)
 Set Login Name.
Q_INVOKABLE void setPassword (QString password)
 Set Password.
Q_INVOKABLE void clearCredentials ()
 Clear stored credentials.
Q_INVOKABLE void login ()
 Start the login process.
Q_INVOKABLE void logout ()
 logout.
Q_INVOKABLE QString getErrorMessage ()

Static Public Member Functions

static void InitLibrary (const char *plugin_path=nullptr)
 Sasl global initialization.
static void FinalizeLibrary ()
 Sasl global finalization.

Private Member Functions

 LoginManager (LoginManager &&)=delete
 Q_DECLARE_PRIVATE (LoginManager)
 Q_DISABLE_COPY (LoginManager)
LoginManageroperator= (LoginManager &&)=delete

Private Attributes

QScopedPointer< LoginManagerPrivated_ptr
friend Process

Detailed Description

Class to handle the Authentication process.

Prior to using an instance of this class, InitLibrary() has to be called.

In Qt6 QML, simply create an SaslInitializer instance before connecting to a process.

Constructor & Destructor Documentation

◆ LoginManager() [1/2]

LoginManager::LoginManager ( QString server_name = QString(),
QObject * parent = nullptr )
explicit

◆ LoginManager() [2/2]

◆ ~LoginManager()

LoginManager::~LoginManager ( )
default

Member Function Documentation

◆ clearCredentials()

Clear stored credentials.

◆ FinalizeLibrary()

Sasl global finalization.

◆ getErrorMessage()

◆ InitLibrary()

void LoginManager::InitLibrary ( const char * plugin_path = nullptr)
static

Sasl global initialization.

Call this at startup of your application to initialize the underlying sasl library.

Parameters
plugin_pathPath to SASL.
Exceptions
PdCom::ExceptionInitialization failed.

◆ login()

Start the login process.

If possible, please call setAuthName() and setPassword() in advance. Do not call login() from whithin any Authentification-related callback (i.e. slots connected to any of our signals which are not queued connections) as use-after-free can happen as a new session is started.

◆ loginFailed

Authentification was not successful.

See getErrorMessage().

◆ loginSuccessful

Authentification was successful.

◆ logout()

logout.

◆ needCredentials

Username and/or password has not been set.

◆ operator=()

LoginManager & QtPdCom::LoginManager::operator= ( LoginManager && )
privatedelete

◆ Q_DECLARE_PRIVATE()

◆ Q_DISABLE_COPY()

◆ setAuthName()

void LoginManager::setAuthName ( QString name)

Set Login Name.

Parameters
nameLogin name.

◆ setPassword()

void LoginManager::setPassword ( QString password)

Set Password.

Parameters
passwordPassword.

Member Data Documentation

◆ d_ptr

◆ Process


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