aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/settings.cpp13
-rw-r--r--lib/settings.h8
2 files changed, 1 insertions, 20 deletions
diff --git a/lib/settings.cpp b/lib/settings.cpp
index 1d36db27..ed9082b0 100644
--- a/lib/settings.cpp
+++ b/lib/settings.cpp
@@ -126,19 +126,6 @@ void AccountSettings::setHomeserver(const QUrl& url)
QString AccountSettings::userId() const { return group().section('/', -1); }
-QString AccountSettings::accessToken() const
-{
- return value(AccessTokenKey).toString();
-}
-
-void AccountSettings::setAccessToken(const QString& accessToken)
-{
- qCWarning(MAIN) << "Saving access_token to QSettings is insecure."
- " Developers, do it manually or contribute to share "
- "QtKeychain logic to libQuotient.";
- setValue(AccessTokenKey, accessToken);
-}
-
void AccountSettings::clearAccessToken()
{
legacySettings.remove(AccessTokenKey);
diff --git a/lib/settings.h b/lib/settings.h
index 84c54802..3f4dc123 100644
--- a/lib/settings.h
+++ b/lib/settings.h
@@ -131,8 +131,6 @@ class AccountSettings : public SettingsGroup {
QTNT_DECLARE_SETTING(QString, deviceId, setDeviceId)
QTNT_DECLARE_SETTING(QString, deviceName, setDeviceName)
QTNT_DECLARE_SETTING(bool, keepLoggedIn, setKeepLoggedIn)
- /** \deprecated \sa setAccessToken */
- Q_PROPERTY(QString accessToken READ accessToken WRITE setAccessToken)
Q_PROPERTY(QByteArray encryptionAccountPickle READ encryptionAccountPickle
WRITE setEncryptionAccountPickle)
public:
@@ -147,11 +145,7 @@ public:
QUrl homeserver() const;
void setHomeserver(const QUrl& url);
- /** \deprecated \sa setToken */
- QString accessToken() const;
- /** \deprecated Storing accessToken in QSettings is unsafe,
- * see quotient-im/Quaternion#181 */
- void setAccessToken(const QString& accessToken);
+ Q_DECL_DEPRECATED_X("Access tokens are not stored in QSettings any more")
Q_INVOKABLE void clearAccessToken();
QByteArray encryptionAccountPickle();