correctly set token expiration from json response

This commit is contained in:
Stephen Birarda 2014-02-18 14:37:46 -08:00
parent 72a877ca49
commit 582681738a
2 changed files with 3 additions and 2 deletions

View file

@ -29,7 +29,7 @@ const char SOLO_NODE_TYPES[2] = {
NodeType::AudioMixer NodeType::AudioMixer
}; };
const QUrl DEFAULT_NODE_AUTH_URL = QUrl("https://data.highfidelity.io"); const QUrl DEFAULT_NODE_AUTH_URL = QUrl("http://localhost:3000");
NodeList* NodeList::_sharedInstance = NULL; NodeList* NodeList::_sharedInstance = NULL;

View file

@ -22,9 +22,10 @@ OAuthAccessToken::OAuthAccessToken() :
OAuthAccessToken::OAuthAccessToken(const QJsonObject& jsonObject) : OAuthAccessToken::OAuthAccessToken(const QJsonObject& jsonObject) :
token(jsonObject["access_token"].toString()), token(jsonObject["access_token"].toString()),
refreshToken(jsonObject["refresh_token"].toString()), refreshToken(jsonObject["refresh_token"].toString()),
expiryTimestamp(QDateTime::currentMSecsSinceEpoch() + jsonObject["expires_in"].toInt()),
tokenType(jsonObject["token_type"].toString()) tokenType(jsonObject["token_type"].toString())
{ {
qDebug() << "the refresh token is" << refreshToken;
} }
OAuthAccessToken::OAuthAccessToken(const OAuthAccessToken& otherToken) { OAuthAccessToken::OAuthAccessToken(const OAuthAccessToken& otherToken) {