JWT implementation for the Drogon framework
It is made as a plugin for the Drogon framework.
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.git
Add 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/plugins
Be 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.git
Before run tests
$ chmod +x test.sh
Run base tests
$ ./test.sh
Run unit tests
$ ./test.sh -t