6 #ifndef QXMPPSASLMANAGER_P_H 7 #define QXMPPSASLMANAGER_P_H 9 #include "QXmppAuthenticationError.h" 10 #include "QXmppOutgoingClient.h" 11 #include "QXmppPromise.h" 12 #include "QXmppSasl_p.h" 13 #include "QXmppTask.h" 22 class SendDataInterface;
28 using AuthError = std::pair<QString, AuthenticationError>;
29 using AuthResult = std::variant<Success, AuthError>;
31 explicit SaslManager(SendDataInterface *socket) : m_socket(socket) { }
34 HandleElementResult handleElement(
const QDomElement &el);
37 SendDataInterface *m_socket;
38 std::unique_ptr<QXmppSaslClient> m_saslClient;
39 std::optional<QXmppPromise<AuthResult>> m_promise;
46 using AuthError = std::pair<QString, AuthenticationError>;
47 using AuthResult = std::variant<Sasl2::Success, AuthError>;
49 explicit Sasl2Manager(SendDataInterface *socket) : m_socket(socket) { }
52 HandleElementResult handleElement(
const QDomElement &);
56 std::unique_ptr<QXmppSaslClient> sasl;
58 std::optional<Sasl2::Continue> unsupportedContinue;
61 SendDataInterface *m_socket;
62 std::optional<State> m_state;
66 class FastTokenManager
72 bool hasToken()
const;
73 void onSasl2Authenticate(Sasl2::Authenticate &auth,
const Sasl2::StreamFeature &feature);
74 void onSasl2Success(
const Sasl2::Success &success);
75 bool tokenChanged()
const {
return m_tokenChanged; }
79 std::optional<SaslHtMechanism> requestedMechanism;
80 bool m_tokenChanged =
false;
85 #endif // QXMPPSASLMANAGER_P_H The QXmppConfiguration class holds configuration options.
Definition: QXmppConfiguration.h:36
The QXmppStreamFeatures class represents the features returned by an XMPP server or client...
Definition: QXmppStreamFeatures.h:22
The QXmppLoggable class represents a source of logging messages.
Definition: QXmppLogger.h:109
Definition: QXmppTask.h:61
Definition: Algorithms.h:12