Logo Search packages:      
Sourcecode: kmess version File versions  Download package

PassportLoginService Class Reference

#include <passportloginservice.h>

Inheritance diagram for PassportLoginService:

HttpSoapConnection AddressBookService OfflineImService RoamingService

List of all members.

Detailed Description

SOAP calls to the passport authentication service.

This class can be used to retrieve the authentication tokens from the Passport web service. Tokens can be used to access other specific services.

It can be used in two ways:

The first case is trivial and doesn't need much explanation. The second is more complex: many Passport web services need authentication tokens to be present in the request header. These tokens expire after a certain amount of time, just like browser cookies.

This class allows for transparent token management. From the subclasses, you can simply leave the header

tags empty: this class will always fill in the correct fields with a valid non-expired token, and will automatically send token update requests when they expire.

This replaces the SSL-based Passport 1.4 login. The old class used a simple HTTP header to send results, this class has to send an large XML blob instead. The webservice is actually called "RST", which likely stands for "Request Security Token" considering the XML contents.

For additional documentation about Passport 3.0, see http://msnpiki.msnfanatic.com/index.php/MSNP13:SOAPTweener

Diederik van der Boor

Valerio Pilo

Definition at line 75 of file passportloginservice.h.


void loginIncorrect ()
 Fired when the login failed because a wrong username/password was used.
void loginSucceeded ()
 Fired when the login succeeded. (version for MSN Protocol 15).
void soapError (QString error, MsnSocketBase::ErrorType type)
 Fired when a fatal error occured.
void soapWarning (const QString &warning, bool isImportant)
 Fired when the user needs to be notified about a problem.

Public Member Functions

void abort ()
 Abort all queued requests.
bool isIdle ()
 Return whether the connection is idle.
void login (const QString &parameters=QString())
 Start the login process.
 PassportLoginService (QObject *parent=0)
 The constructor.
virtual ~PassportLoginService ()
 The destructor.

Static Public Member Functions

static const QString createHotmailToken (const QString &passportToken, const QString &proofToken, const QString &folder)

Protected Member Functions

SoapMessagegetCurrentRequest (bool copy=false) const
 Return the current request message, if any.
virtual void parseSecureFault (SoapMessage *message)
 Bounce the authenticated SOAP fault to a subclass.
virtual void parseSecureResult (SoapMessage *message)
 Bounce the authenticated SOAP response to a subclass.
virtual void sendRequest (SoapMessage *message, bool urgent=false)
 Send a SOAP request to the webservice.
void sendSecureRequest (SoapMessage *message, const QString &requiredTokenName=QString())
 Send the authenticated SOAP request from a subclass.
QString textNodeDecode (const QString &string)
 Decode UTF-8 text from a SOAP node (usually friendly names).

Protected Attributes


Private Member Functions

void parseSoapFault (SoapMessage *message)
 Internal function to parse the SOAP fault.
void parseSoapResult (SoapMessage *message)
 Internal function to extract security tokens from the server response.
void requestMultipleSecurityTokens ()
 SOAP call to request the login tokens.

Private Attributes

QString authenticationParameters_
 The list of parameters sent by the notification server.
QString handle_
 The user's handle.
QHash< SoapMessage *, QString > inProgressRequests_
 The list of requests which are being sent.
bool isWaitingForNewTokens_
 Whether we're waiting for new authentication tokens.
QString password_
 The user's password.
QHash< SoapMessage *, QString > queuedRequests_
 The queue of requests waiting new authentication tokens.

Static Private Attributes

static QHash< QString, QDateTime > tokenExpirationDates_
 The expiration dates of the security tokens.

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

Generated by  Doxygen 1.6.0   Back to index