1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-12 17:14:00 +02:00

Revamp twitter auth mechanism, which will hopefully remove false-positive auth success and allow de-authing

This commit is contained in:
Jeff Mitchell
2011-03-22 14:36:42 -04:00
parent 458551d78a
commit 1211bf23b6
6 changed files with 126 additions and 38 deletions

View File

@@ -1,5 +1,6 @@
#include "tomahawkoauthtwitter.h"
#include <QInputDialog>
#include <QDebug>
TomahawkOAuthTwitter::TomahawkOAuthTwitter( QObject* parent )
: OAuthTwitter( parent )
@@ -7,7 +8,8 @@ TomahawkOAuthTwitter::TomahawkOAuthTwitter( QObject* parent )
}
int TomahawkOAuthTwitter::authorizationWidget()
int
TomahawkOAuthTwitter::authorizationWidget()
{
bool ok;
int i = QInputDialog::getInt(0, QString( "Twitter PIN" ), QString( "After authenticating on Twitter's web site,\nenter the displayed PIN number here:" ), 0, 0, 2147483647, 1, &ok);
@@ -16,3 +18,11 @@ int TomahawkOAuthTwitter::authorizationWidget()
return 0;
}
void
TomahawkOAuthTwitter::error()
{
qDebug() << Q_FUNC_INFO;
setOAuthToken( QString().toLatin1() );
setOAuthTokenSecret( QString().toLatin1() );
}

View File

@@ -16,6 +16,9 @@ public:
protected:
virtual int authorizationWidget();
private slots:
void error();
};
#endif