NonSaslAuth Class Reference

`#include <nonsaslauth.h>`

Inheritance diagram for NonSaslAuth:
[legend]

## Public Member Functions

| NonSaslAuth (Client *parent)
virtual | ~NonSaslAuth ()
void | doAuth (const std::string &sid)
virtual bool | handleIq (const IQ &iq)
virtual void | handleIqID (const IQ &iq, int context)
Public Member Functions inherited from IqHandler
virtual | ~IqHandler ()

## Detailed Description

This class is an implementation of XEP-0078 (Non-SASL Authentication).

It is invoked by Client automatically if supported by the server and if SASL authentication is not supported. You should not need to use this class manually.

XEP Version: 2.3

Author
  Jakob Schröter js@ca.nosp@m.maya.nosp@m..net

Since
  0.3

Definition at line 39 of file nonsaslauth.h.

## Constructor & Destructor Documentation

## NonSaslAuth()

NonSaslAuth | ( | Client * | parent | ) |

Constructor.

Parameters

  parent | The ClientBase which is used to authenticate.

Definition at line 86 of file nonsaslauth.cpp.

## ~NonSaslAuth()

~NonSaslAuth | ( |  | ) |

virtual

Virtual Destructor.

Definition at line 96 of file nonsaslauth.cpp.

## Member Function Documentation

## doAuth()

void doAuth | ( | const std::string & | sid | ) |

Starts authentication by querying the server for the required authentication fields. Digest authentication is preferred over plain text passwords.

Parameters

  sid | The session ID given by the server with the stream opening tag.

Definition at line 106 of file nonsaslauth.cpp.

## handleIq()

virtual bool handleIq | ( | const IQ & | iq | ) |

inline virtual

Reimplement this function if you want to be notified about incoming IQs.

Parameters

  iq | The complete IQ stanza.

Returns
  Indicates whether a request of type 'get' or 'set' has been handled. This includes the obligatory 'result' answer. If you return false, an 'error' will be sent back.

Since
  1.0

Implements IqHandler.

Definition at line 61 of file nonsaslauth.h.

## handleIqID()

void handleIqID | ( | const IQ & | iq,
|  | int | context )

virtual

Reimplement this function if you want to be notified about incoming IQs with a specific value of the `id` attribute. You have to enable tracking of those IDs using Client::trackID(). This is usually useful for IDs that generate a empty positive reply, i.e. <iq type='result' id='reg'/> where a namespace filter wouldn't work.

Parameters

  iq | The complete IQ stanza.
  context | A value to restore context, stored with ClientBase::trackID().

Note
  Only IQ stanzas of type 'result' or 'error' can arrive here.

Since
  1.0

Implements IqHandler.

Definition at line 116 of file nonsaslauth.cpp.

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

- nonsaslauth.h
- nonsaslauth.cpp