{"id":19492837,"url":"https://github.com/oatpp/example-jwt","last_synced_at":"2025-04-25T20:30:52.198Z","repository":{"id":98397824,"uuid":"317048545","full_name":"oatpp/example-jwt","owner":"oatpp","description":"A complete example of a CRUD service with API secured with JSON Web Token (JWT)","archived":false,"fork":false,"pushed_at":"2023-07-17T16:54:23.000Z","size":38,"stargazers_count":6,"open_issues_count":3,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-29T22:49:43.582Z","etag":null,"topics":["authorization","crud","jwt","oatpp","swagger-ui"],"latest_commit_sha":null,"homepage":"https://oatpp.io/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oatpp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-11-29T21:42:02.000Z","updated_at":"2024-07-18T07:48:46.000Z","dependencies_parsed_at":"2023-03-13T16:01:26.708Z","dependency_job_id":"8680391e-8b3c-445d-bd32-d64ec7148f7a","html_url":"https://github.com/oatpp/example-jwt","commit_stats":{"total_commits":8,"total_committers":2,"mean_commits":4.0,"dds":0.125,"last_synced_commit":"fc86a27cfdd78e5500291df91c0015cffb36b4da"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oatpp%2Fexample-jwt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oatpp%2Fexample-jwt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oatpp%2Fexample-jwt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oatpp%2Fexample-jwt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oatpp","download_url":"https://codeload.github.com/oatpp/example-jwt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224015673,"owners_count":17241537,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authorization","crud","jwt","oatpp","swagger-ui"],"created_at":"2024-11-10T21:23:14.638Z","updated_at":"2024-11-10T21:23:16.072Z","avatar_url":"https://github.com/oatpp.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Example-JWT [![Build Status](https://dev.azure.com/lganzzzo/lganzzzo/_apis/build/status/oatpp.example-jwt?branchName=master)](https://dev.azure.com/lganzzzo/lganzzzo/_build?definitionId=9?branchName=master)\n\nA complete example of a \"CRUD\" API secured with JSON Web Token (JWT) built with [Oat++](https://github.com/oatpp/oatpp) and [jwt-cpp](https://github.com/Thalhammer/jwt-cpp).\n\nIn this example:\n\n- How to create CRUD endpoints.\n- How to secure endpoints with JWT.\n- How to use [Oat++ ORM](https://oatpp.io/docs/components/orm/#high-level-overview) - PostgreSQL example.\n- How to document API with Swagger-UI and OpenApi 3.0.0.\n\nMore about Oat++:\n\n- [Oat++ Website](https://oatpp.io/)\n- [Oat++ Github Repository](https://github.com/oatpp/oatpp)\n- [Get Started](https://oatpp.io/docs/start)\n\n## Overview\n\nThis project is using the following oatpp modules:\n\n- [oatpp](https://github.com/oatpp/oatpp) \n- [oatpp-swagger](https://github.com/oatpp/oatpp-swagger)\n- [oatpp-postgresql](https://github.com/oatpp/oatpp-postgresql)\n- [oatpp-openssl](https://github.com/oatpp/oatpp-openssl)\n\n### 3rd party dependencies\n\n- OpenSSL\n- [jwt-cpp](https://github.com/Thalhammer/jwt-cpp).\n\n### Project layout\n\n```\n|- CMakeLists.txt                        // projects CMakeLists.txt\n|- sql/                                  // SQL migration scripts\n|- src/\n|   |\n|   |- controller/                       // Folder containing REST Controllers (AuthController, StoryController)\n|   |- db/                               // Folder containing database clients\n|   |- dto/                              // DTOs are declared here\n|   |- service/                          // Service business logic classes (AuthService, StoryService)\n|   |- AppComponent.hpp                  // Service config\n|   |- DatabaseComponent.hpp             // Database config\n|   |- SwaggerComponent.hpp              // Swagger-UI config\n|   |- App.cpp                           // main() is here\n|\n|- test/                                 // test folder\n|- utility/install-oatpp-modules.sh      // utility script to install required oatpp-modules.\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foatpp%2Fexample-jwt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foatpp%2Fexample-jwt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foatpp%2Fexample-jwt/lists"}