From 3efaf7c9463261fb2d182a7ae00d9045a2b273b8 Mon Sep 17 00:00:00 2001 From: Jeremy Rimpo Date: Tue, 12 May 2026 13:50:45 -0500 Subject: Migrating to OAuth Authentication (#2374) Co-authored-by: aglowinthefield <146008217+aglowinthefield@users.noreply.github.com> Co-authored-by: Jonathan Feenstra <26406078+JonathanFeenstra@users.noreply.github.com> --- src/apiuseraccount.cpp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'src/apiuseraccount.cpp') diff --git a/src/apiuseraccount.cpp b/src/apiuseraccount.cpp index 4b908df0..e9785b40 100644 --- a/src/apiuseraccount.cpp +++ b/src/apiuseraccount.cpp @@ -19,12 +19,17 @@ APIUserAccount::APIUserAccount() : m_type(APIUserAccountTypes::None) {} bool APIUserAccount::isValid() const { - return !m_key.isEmpty(); + return !m_accessToken.isEmpty() || !m_apiKey.isEmpty(); +} + +const QString& APIUserAccount::accessToken() const +{ + return m_accessToken; } const QString& APIUserAccount::apiKey() const { - return m_key; + return m_apiKey; } const QString& APIUserAccount::id() const @@ -47,9 +52,15 @@ const APILimits& APIUserAccount::limits() const return m_limits; } -APIUserAccount& APIUserAccount::apiKey(const QString& key) +APIUserAccount& APIUserAccount::accessToken(const QString& token) +{ + m_accessToken = token; + return *this; +} + +APIUserAccount& APIUserAccount::apiKey(const QString& apiKey) { - m_key = key; + m_apiKey = apiKey; return *this; } -- cgit v1.3.1