[SCM] ktp-auth-handler packaging branch, master, updated. debian/15.12.1-2-282-g080758e
Maximiliano Curia
maxy at moszumanska.debian.org
Fri May 27 23:59:44 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-auth-handler.git;a=commitdiff;h=eb979fc
The following commit has been merged in the master branch:
commit eb979fcd3b64a828e50f68b6244e82b87a4cf11f
Author: Martin Klapetek <mklapetek at kde.org>
Date: Fri Mar 20 01:10:00 2015 +0100
Remove support for X-FACEBOOK-PLATFORM auth
Facebook Chat API is going away for good in April.
You served us well and it was fun while it lasted.
RIP.
---
sasl-auth-op.cpp | 14 +----
x-telepathy-sso-facebook-operation.cpp | 102 ---------------------------------
x-telepathy-sso-facebook-operation.h | 56 ------------------
3 files changed, 3 insertions(+), 169 deletions(-)
diff --git a/sasl-auth-op.cpp b/sasl-auth-op.cpp
index e94920d..58843d1 100644
--- a/sasl-auth-op.cpp
+++ b/sasl-auth-op.cpp
@@ -69,15 +69,7 @@ void SaslAuthOp::gotProperties(Tp::PendingOperation *op)
QString error = qdbus_cast<QString>(props.value(QLatin1String("SASLError")));
QVariantMap errorDetails = qdbus_cast<QVariantMap>(props.value(QLatin1String("SASLErrorDetails")));
- if (mechanisms.contains(QLatin1String("X-FACEBOOK-PLATFORM"))) {
- qDebug() << "Starting Facebook OAuth auth";
- XTelepathySSOFacebookOperation *authop = new XTelepathySSOFacebookOperation(m_account, m_accountStorageId, m_saslIface);
- connect(authop,
- SIGNAL(finished(Tp::PendingOperation*)),
- SLOT(onAuthOperationFinished(Tp::PendingOperation*)));
-
- authop->onSASLStatusChanged(status, error, errorDetails);
- } else if (mechanisms.contains(QLatin1String("X-OAUTH2"))) {
+ if (mechanisms.contains(QLatin1String("X-OAUTH2"))) {
qDebug() << "Starting X-OAuth2 auth";
XTelepathySSOGoogleOperation *authop = new XTelepathySSOGoogleOperation(m_account, m_accountStorageId, m_saslIface);
connect(authop,
@@ -95,10 +87,10 @@ void SaslAuthOp::gotProperties(Tp::PendingOperation *op)
authop->onSASLStatusChanged(status, error, errorDetails);
} else {
- qWarning() << "X-TELEPATHY-PASSWORD, X-OAUTH2, X-FACEBOOK_PLATFORM are the only supported SASL mechanism and are not available:" << mechanisms;
+ qWarning() << "X-TELEPATHY-PASSWORD, X-OAUTH2 are the only supported SASL mechanism and are not available:" << mechanisms;
m_channel->requestClose();
setFinishedWithError(TP_QT_ERROR_NOT_IMPLEMENTED,
- QLatin1String("X-TELEPATHY-PASSWORD, X-OAUTH2, X-FACEBOOK_PLATFORM are the only supported SASL mechanism and are not available:"));
+ QLatin1String("X-TELEPATHY-PASSWORD, X-OAUTH2 are the only supported SASL mechanism and are not available:"));
return;
}
}
diff --git a/x-telepathy-sso-facebook-operation.cpp b/x-telepathy-sso-facebook-operation.cpp
deleted file mode 100644
index 5b9bf57..0000000
--- a/x-telepathy-sso-facebook-operation.cpp
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- Copyright (C) 2013 David Edmundson <kde at davidedmundson.co.uk>
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "x-telepathy-sso-facebook-operation.h"
-
-#include <TelepathyQt/Account>
-#include <TelepathyQt/ChannelInterfaceSASLAuthenticationInterface>
-#include <TelepathyQt/AccountInterfaceStorageInterface>
-
-#include <TelepathyQt/PendingVariantMap>
-
-#include <Accounts/Account>
-#include <KAccounts/getcredentialsjob.h>
-
-#include <QDebug>
-#include <QUrlQuery>
-#include <QUrl>
-
-
-XTelepathySSOFacebookOperation::XTelepathySSOFacebookOperation(const Tp::AccountPtr &account, quint32 kaccountsId, Tp::Client::ChannelInterfaceSASLAuthenticationInterface *saslIface)
- : PendingOperation(account),
- m_account(account),
- m_saslIface(saslIface),
- m_kaccountsId(kaccountsId)
-{
- Q_ASSERT(kaccountsId);
- connect(m_saslIface, SIGNAL(SASLStatusChanged(uint,QString,QVariantMap)), SLOT(onSASLStatusChanged(uint,QString,QVariantMap)));
- connect(m_saslIface, SIGNAL(NewChallenge(QByteArray)), SLOT(onNewChallenge(QByteArray)));
-}
-
-
-void XTelepathySSOFacebookOperation::onSASLStatusChanged(uint status, const QString &reason, const QVariantMap &details)
-{
- qDebug() << "New status is: " << status;
- qDebug() << "Details: " << details;
- qDebug() << "Reason: " << reason;
-
- switch (status){
- case Tp::SASLStatusNotStarted:
- {
- qDebug() << "starting credentials job";
- m_saslIface->StartMechanism(QLatin1String("X-FACEBOOK-PLATFORM"));
- break;
- }
-
- case Tp::SASLStatusServerSucceeded:
- qDebug() << "Authentication handshake";
- m_saslIface->AcceptSASL();
- break;
-
- case Tp::SASLStatusSucceeded:
- qDebug() << "Authentication succeeded";
- setFinished();
- break;
- }
-}
-
-void XTelepathySSOFacebookOperation::onNewChallenge(const QByteArray& challengeData)
-{
- m_challengeData = challengeData;
-
- GetCredentialsJob *job = new GetCredentialsJob(m_kaccountsId, this);
- connect(job, SIGNAL(finished(KJob*)), SLOT(gotCredentials(KJob *)));
- job->start();
-}
-
-void XTelepathySSOFacebookOperation::gotCredentials(KJob *kJob)
-{
- qDebug();
- QUrl fbRequestUrl;
-
- fbRequestUrl.setQuery(m_challengeData);
- QUrlQuery fbRequestQuery(fbRequestUrl);
- QUrlQuery fbResponseQuery;
-
- qDebug() << fbRequestQuery.queryItemValue("version");
-
- GetCredentialsJob *job = qobject_cast< GetCredentialsJob* >(kJob);
- QVariantMap credentialsData = job->credentialsData();
- fbResponseQuery.addQueryItem("method", fbRequestQuery.queryItemValue("method"));
- fbResponseQuery.addQueryItem("nonce", fbRequestQuery.queryItemValue("nonce"));
- fbResponseQuery.addQueryItem("access_token", credentialsData["AccessToken"].toString());
- fbResponseQuery.addQueryItem("api_key", credentialsData["ClientId"].toString());
- fbResponseQuery.addQueryItem("call_id", "0");
- fbResponseQuery.addQueryItem("v", "1.0");
-
- m_saslIface->Respond(fbResponseQuery.query().toUtf8());
-}
diff --git a/x-telepathy-sso-facebook-operation.h b/x-telepathy-sso-facebook-operation.h
deleted file mode 100644
index e924d4a..0000000
--- a/x-telepathy-sso-facebook-operation.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) 2013 David Edmundson <kde at davidedmundson.co.uk>
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-
-#ifndef X_TELEPATHY_SSO_OPERATION_H
-#define X_TELEPATHY_SSO_OPERATION_H
-
-#include <TelepathyQt/PendingOperation>
-#include <TelepathyQt/Types>
-#include <TelepathyQt/Channel>
-#include <TelepathyQt/Account>
-
-class KJob;
-
-class XTelepathySSOFacebookOperation : public Tp::PendingOperation
-{
- Q_OBJECT
- Q_DISABLE_COPY(XTelepathySSOFacebookOperation)
-
-public:
- explicit XTelepathySSOFacebookOperation(
- const Tp::AccountPtr &account,
- quint32 kaccountsId,
- Tp::Client::ChannelInterfaceSASLAuthenticationInterface *saslIface);
-
-private Q_SLOTS:
- void onSASLStatusChanged(uint status, const QString &reason, const QVariantMap &details);
- void onNewChallenge(const QByteArray &challengeData);
- void gotCredentials(KJob *kjob);
-
-private:
- Tp::AccountPtr m_account;
- Tp::Client::ChannelInterfaceSASLAuthenticationInterface *m_saslIface;
-
- quint32 m_kaccountsId;
- QByteArray m_challengeData;
-
- friend class SaslAuthOp;
-};
-
-#endif // X_TELEPATHY_SSO_OPERATION_H
--
ktp-auth-handler packaging
More information about the pkg-kde-commits
mailing list