fix oauth early token expiry

This commit is contained in:
Stephen Birarda 2014-02-25 14:38:14 -08:00
parent ce3d6d2fca
commit 27be157d70

View file

@ -7,6 +7,7 @@
//
#include <QtCore/QDataStream>
#include <QtCore/QDebug>
#include "OAuthAccessToken.h"
@ -22,7 +23,7 @@ OAuthAccessToken::OAuthAccessToken() :
OAuthAccessToken::OAuthAccessToken(const QJsonObject& jsonObject) :
token(jsonObject["access_token"].toString()),
refreshToken(jsonObject["refresh_token"].toString()),
expiryTimestamp(QDateTime::currentMSecsSinceEpoch() + jsonObject["expires_in"].toDouble()),
expiryTimestamp(QDateTime::currentMSecsSinceEpoch() + (jsonObject["expires_in"].toDouble() * 1000)),
tokenType(jsonObject["token_type"].toString())
{