defuze.me  Client
Public Slots | Signals | Public Member Functions
Network::Authenticator Class Reference

This class is used by the NetworkCore to handle and maintaing authentication informations for the webservice API. More...

#include <authenticator.hpp>

Inheritance diagram for Network::Authenticator:
Inheritance graph
[legend]
Collaboration diagram for Network::Authenticator:
Collaboration graph
[legend]

List of all members.

Public Slots

void authenticate (const QString &login, const QString &password)
void cancel ()
 Cancel the authentication request and clear the token.
void invalidate ()
 Destroy token and query a new one.

Signals

void failed (const QString &message)
 Emited if the server rejected the authentication.
void authenticated ()
 Emited after the authenticator sucessfully received a new token.
void needCredentials (const QString &login)
 Emited when the authenticator need credentials.

Public Member Functions

 Authenticator (NetworkCore &net)
const QString getToken ()
bool hasToken () const
QVariantMap getRadioInfo () const

Detailed Description

This class is used by the NetworkCore to handle and maintaing authentication informations for the webservice API.

You should not instantiate it, the networkCore contain one. The networkCore will automatically call this class to fill API auth informations If the authenticator need credentials, it will emit needCredentials event so the receiver can fills required credentials and call back authenticate()

Definition at line 33 of file authenticator.hpp.


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