refactor: Move QJsonWebToken lib to third_party/

This commit is contained in:
Lars Toenning
2023-12-17 11:45:06 +01:00
parent 52cb97c222
commit cb0912ebc0
11 changed files with 34 additions and 7 deletions

View File

@@ -144,6 +144,7 @@ add_subdirectory(cmake/crashpad)
add_subdirectory(cmake/tls)
add_subdirectory(cmake/simconnect)
add_subdirectory(cmake/dplay)
add_subdirectory(third_party)
if(SWIFT_BUILD_XSWIFTBUS)

View File

@@ -268,6 +268,7 @@ target_link_libraries(core
PRIVATE
Qt::Qml
Qt::Xml
QJsonWebToken
)
target_compile_definitions(core PRIVATE BUILD_BLACKCORE_LIB)

View File

@@ -4,7 +4,7 @@
#include "blackcore/afv/connection/apiserverconnection.h"
#include "blackmisc/network/networkutils.h"
#include "blackmisc/network/external/qjsonwebtoken.h"
#include "qjsonwebtoken/qjsonwebtoken.h"
#include "blackmisc/logmessage.h"
#include "blackmisc/stringutils.h"
#include "blackconfig/buildconfig.h"

View File

@@ -370,8 +370,6 @@ add_library(misc SHARED
network/settings/serversettings.h
network/authenticateduser.cpp
network/authenticateduser.h
network/external/qjsonwebtoken.cpp
network/external/qjsonwebtoken.h
network/client.cpp
network/client.h
network/clientlist.cpp

4
third_party/CMakeLists.txt vendored Normal file
View File

@@ -0,0 +1,4 @@
# SPDX-FileCopyrightText: Copyright (C) swift Project Community / Contributors
# SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
add_subdirectory(qjsonwebtoken)

View File

@@ -0,0 +1,17 @@
# SPDX-FileCopyrightText: Copyright (C) swift Project Community / Contributors
# SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
add_library(QJsonWebToken STATIC)
target_sources(QJsonWebToken
PRIVATE
qjsonwebtoken.cpp
qjsonwebtoken.h
)
target_link_libraries(QJsonWebToken
PUBLIC
Qt::Core
)
target_include_directories(QJsonWebToken
PUBLIC
${PROJECT_SOURCE_DIR}/third_party
)

8
third_party/qjsonwebtoken/README.md vendored Normal file
View File

@@ -0,0 +1,8 @@
<!--
SPDX-FileCopyrightText: Copyright (C) swift Project Community / Contributors
SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
-->
The files ``qjsonwebtoken.cpp`` and ``qjsonwebtoken.h`` inside this folder are imported from https://github.com/juangburgos/QJsonWebToken at revision
[65eb0f789a9c19e04f0f620422d648ec9388ce2b](https://github.com/juangburgos/QJsonWebToken/commit/65eb0f789a9c19e04f0f620422d648ec9388ce2b) with additional modifications.
They are licensed under the MIT license (SPDX-License-Identifier: MIT).

View File

@@ -4,7 +4,7 @@
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "blackmisc/network/external/qjsonwebtoken.h"
#include "qjsonwebtoken.h"
#include <QDebug>

View File

@@ -15,8 +15,6 @@
#ifndef QJSONWEBTOKEN_H
#define QJSONWEBTOKEN_H
#include "blackmisc/blackmiscexport.h"
#include <QObject>
#include <QMessageAuthenticationCode>
#include <QJsonDocument>
@@ -55,7 +53,7 @@ The repository of this project includes examples that demonstrate the use of thi
* ./examples/jwtcreator/ : Example that shows how to create a JWT with your custom *payload*.
* ./examples/jwtverifier/ : Example that shows how to validate a JWT with a given *secret*.
*/
class BLACKMISC_EXPORT QJsonWebToken
class QJsonWebToken
{
public: