mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-22 21:06:27 +02:00
correctly set token expiration from json response
This commit is contained in:
parent
72a877ca49
commit
582681738a
2 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue