Change register response access_token to scalar_token

This commit is contained in:
Luke Barnard 2016-08-17 17:16:19 +01:00
parent 69e8cb6f44
commit 46d306a217

View File

@ -34,8 +34,10 @@ class ScalarAuthClient {
defer.reject(err);
} else if (response.statusCode / 100 !== 2) {
defer.reject({statusCode: response.statusCode});
} else if (!body || !body.scalar_token) {
defer.reject(new Error("Missing scalar_token in response"));
} else {
defer.resolve(body.access_token);
defer.resolve(body.scalar_token);
}
});