diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-11-19 17:57:41 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-11-19 17:57:41 +0900 |
commit | 5937127b73a82fc86f6546397373ce9dbaf4e560 (patch) | |
tree | 1e3b4e5ddd50e8a4b605e7e599591d47fe9bed55 /lib/connectiondata.h | |
parent | 1d57741c679ec3112ae45e833b8f152fa737b944 (diff) | |
download | libquotient-5937127b73a82fc86f6546397373ce9dbaf4e560.tar.gz libquotient-5937127b73a82fc86f6546397373ce9dbaf4e560.zip |
BaseJob: Don't send accessToken if not needed; send again on 401
The first part closes #358; the second part is a workaround for non-standard
cases when endpoints without security by the spec turn out to be secured
(in particular, the case of authenticating media servers).
Diffstat (limited to 'lib/connectiondata.h')
-rw-r--r-- | lib/connectiondata.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/connectiondata.h b/lib/connectiondata.h index b367c977..000099d1 100644 --- a/lib/connectiondata.h +++ b/lib/connectiondata.h @@ -40,6 +40,7 @@ public: QUrl baseUrl() const; const QString& deviceId() const; const QString& userId() const; + bool needsToken(const QString& requestName) const; QNetworkAccessManager* nam() const; void setBaseUrl(QUrl baseUrl); @@ -50,6 +51,7 @@ public: void setPort(int port); void setDeviceId(const QString& deviceId); void setUserId(const QString& userId); + void setNeedsToken(const QString& requestName); QString lastEvent() const; void setLastEvent(QString identifier); |