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:
@@ -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() );
|
||||
}
|
||||
|
@@ -16,6 +16,9 @@ public:
|
||||
|
||||
protected:
|
||||
virtual int authorizationWidget();
|
||||
|
||||
private slots:
|
||||
void error();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user