QtPdCom
1.4.1
|
Class to handle the Authentication process. More...
#include <LoginManager.h>
Signals | |
void | needCredentials () |
Username and/or password has not been set. More... | |
void | loginSuccessful () |
Authentification was successful. More... | |
void | loginFailed () |
Authentification was not successful. More... | |
Public Member Functions | |
LoginManager (QString server_name=QString(), QObject *parent=nullptr) | |
~LoginManager () | |
Q_INVOKABLE void | setAuthName (QString name) |
Set Login Name. More... | |
Q_INVOKABLE void | setPassword (QString password) |
Set Password. More... | |
Q_INVOKABLE void | clearCredentials () |
Clear stored credentials. More... | |
Q_INVOKABLE void | login () |
Start the login process. More... | |
Q_INVOKABLE void | logout () |
logout. More... | |
Q_INVOKABLE QString | getErrorMessage () |
Static Public Member Functions | |
static void | InitLibrary (const char *plugin_path=nullptr) |
Sasl global initialization. More... | |
static void | FinalizeLibrary () |
Sasl global finalization. More... | |
Private Member Functions | |
Q_DECLARE_PRIVATE (LoginManager) | |
Q_DISABLE_COPY (LoginManager) | |
LoginManager & | operator= (LoginManager &&)=delete |
LoginManager (LoginManager &&)=delete | |
Private Attributes | |
QScopedPointer< LoginManagerPrivate > | d_ptr |
friend | Process |
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.
|
explicit |
|
default |
|
privatedelete |
void LoginManager::clearCredentials | ( | ) |
Clear stored credentials.
|
static |
Sasl global finalization.
Referenced by QtPdCom::SaslInitializer::~SaslInitializer().
QString LoginManager::getErrorMessage | ( | ) |
|
static |
Sasl global initialization.
Call this at startup of your application to initialize the underlying sasl library.
plugin_path | Path to SASL. |
PdCom::Exception | Initialization failed. |
Referenced by QtPdCom::SaslInitializer::SaslInitializer().
void LoginManager::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.
|
signal |
Authentification was not successful.
See getErrorMessage().
|
signal |
Authentification was successful.
void LoginManager::logout | ( | ) |
logout.
|
signal |
Username and/or password has not been set.
|
privatedelete |
|
private |
|
private |
void LoginManager::setAuthName | ( | QString | name | ) |
Set Login Name.
name | Login name. |
void LoginManager::setPassword | ( | QString | password | ) |
Set Password.
password | Password. |
|
private |
Referenced by QtPdCom::Process::setLoginManager().
|
private |