JWT implementation for the Drogon framework
It is made as a plugin for the Drogon framework.
- cpp-jwt https://github.com/arun11299/cpp-jwt
- json https://github.com/nlohmann/json
Clone repos to root dir of your drogon app
$ cd ~/drogon-app
$ git clone https://github.com/arun11299/cpp-jwt.git
$ git clone https://github.com/nlohmann/json.gitAdd some lines in CMakeLists.txt of your dragon app
...
find_package(Drogon CONFIG REQUIRED)
add_subdirectory(cpp-jwt)
add_subdirectory(json)
target_link_libraries(${PROJECT_NAME} PRIVATE Drogon::Drogon cpp-jwt::cpp-jwt nlohmann_json::nlohmann_json)
...Download to the plugin directory of the target drogon app, E.g. ~/drogon-app/plugins
$ git clone https://github.com/roq3/JWT-drogon.git
$ cp JWT-drogon/JWT.* ~/drogon-app/plugins
$ cp JWT-drogon/JWT*.* ~/drogon-app/pluginsBe aware of add the plugin into the config.json. Set the "name" field to "JWT"
...
"plugins": [
{
"name": "JWT",
"dependencies": [],
"config": {
}
}
],
...Build the app as usual
Clone repos to root dir of the project
$ cd ~/JWT-drogon
$ git clone https://github.com/arun11299/cpp-jwt.git
$ git clone https://github.com/nlohmann/json.gitBefore run tests
$ chmod +x test.shRun base tests
$ ./test.shRun unit tests
$ ./test.sh -t