{"id":29368393,"url":"https://github.com/arturbomtempo-learning/secure-rest-api-spring-boot-jwt","last_synced_at":"2026-05-06T03:34:47.199Z","repository":{"id":289967914,"uuid":"971671422","full_name":"arturbomtempo-learning/secure-rest-api-spring-boot-jwt","owner":"arturbomtempo-learning","description":"A project developed to deepen understanding of Spring Security and JWT in a Spring Boot application.","archived":false,"fork":false,"pushed_at":"2025-04-26T02:35:32.000Z","size":2926,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-26T00:48:00.226Z","etag":null,"topics":["auth0","h2-database","java","jwt","lombok","spring","spring-boot","spring-data-jpa","spring-security","spring-web"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arturbomtempo-learning.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-23T22:07:28.000Z","updated_at":"2025-07-01T02:23:04.000Z","dependencies_parsed_at":"2025-04-26T03:49:13.695Z","dependency_job_id":null,"html_url":"https://github.com/arturbomtempo-learning/secure-rest-api-spring-boot-jwt","commit_stats":null,"previous_names":["arturbomtempo-dev/secure-rest-api-spring-boot-jwt","artur-bomtempo-learning/secure-rest-api-spring-boot-jwt","arturbomtempo-learning/secure-rest-api-spring-boot-jwt"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/arturbomtempo-learning/secure-rest-api-spring-boot-jwt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arturbomtempo-learning%2Fsecure-rest-api-spring-boot-jwt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arturbomtempo-learning%2Fsecure-rest-api-spring-boot-jwt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arturbomtempo-learning%2Fsecure-rest-api-spring-boot-jwt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arturbomtempo-learning%2Fsecure-rest-api-spring-boot-jwt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arturbomtempo-learning","download_url":"https://codeload.github.com/arturbomtempo-learning/secure-rest-api-spring-boot-jwt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arturbomtempo-learning%2Fsecure-rest-api-spring-boot-jwt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32677930,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T02:33:58.958Z","status":"ssl_error","status_checked_at":"2026-05-06T02:33:39.611Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["auth0","h2-database","java","jwt","lombok","spring","spring-boot","spring-data-jpa","spring-security","spring-web"],"created_at":"2025-07-09T12:49:26.933Z","updated_at":"2026-05-06T03:34:47.172Z","avatar_url":"https://github.com/arturbomtempo-learning.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv  align=\"center\" id=\"about\"\u003e\n\t\u003ch1 align=\"center\"\u003e\n        SecureAuth API\n    \u003c/h1\u003e\n    \u003cp align=\"center\"\u003e\n        SecureAuth API is a simple, introductory RESTful service designed to explore the fundamentals of token-based security with Spring Boot. Leveraging Spring Security and JWT, this project demonstrates basic user registration, authentication, and protected resource access, offering a hands-on learning experience for implementing secure Java backend applications.\n    \u003c/p\u003e\n\t\u003cimg \n        src=\"./resources/banner/spring-security.png\"\n        alt=\"Main project image\"\n    /\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003ca href=\"https://docs.oracle.com/en/java/\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/made_with-Java-orange\" alt=\"Made with Java\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://docs.spring.io/spring-boot/index.html\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/Spring_Boot-v3.4.4-green\" alt=\"NPM version\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://convert2base.vercel.app/\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/status-local_development_complete-yellow\" alt=\"Status: Local Development Complete\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/SpaceForDevelopment/Convert2Base-Package/blob/main/LICENSE.md\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-red\" alt=\"MIT License\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n\u003cdiv id=\"table-of-contents\"\u003e\u003c/div\u003e\n\n## 📋 Table of Contents\n\n- [About](#about)\n- [Table of Contents](#table-of-contents)\n- [Features](#features)\n- [Application Demonstration](#application-demonstration)\n- [Setup and Run the Application](#setup-and-run-the-application)\n- [Technologies](#technologies)\n- [Author](#author)\n- [License](#license)\n\n\u003cdiv id=\"features\"\u003e\u003c/div\u003e\n\n## 📝 Features\n\nAll API routes for the listed features have been fully developed and are functional. As this project is purely educational, there is no front-end implementation. Below is a detailed list of the features and their status:\n\n- [x] User registration\n- [x] User login\n- [x] Client-only route access\n- [x] Administrator-only route access\n- [x] Token validation\n\n\u003cdiv id=\"application-demonstration\"\u003e\u003c/div\u003e\n\n## 📲 Application Demonstration\n\nSince this is a backend API, you can test it locally using Insomnia or other API testing services like Postman. Below are the images showcasing the typical workflow:\n\n- Create a user\n\n![Create a user](./resources/screenshots/create-user.png)\n\n- Log in and obtain a JWT token\n\n![Log in and obtain a JWT token](./resources/screenshots/login.png)\n\n- Test general endpoints (token validation)\n\n![Test general endpoints (token validation)](./resources/screenshots/test-general-endpoints.png)\n\n- Test client-only routes\n\n![Test client-only routes](./resources/screenshots/test-client-only-route.png)\n\n- Test admin-only routes with a client token (results in failure due to lack of admin permission)\n\n![Test admin-only routes with a client token](./resources/screenshots/test-admin-only-route.png)\n\n\u003cdiv id=\"setup-and-run-the-application\"\u003e\u003c/div\u003e\n\n## 📁 Setup and Run the Application\n\n### ⚙️ Prerequisites\n\nBefore starting, you need to have the following tools installed on your machine: [Git](https://git-scm.com) and [Java 21+](https://www.oracle.com/br/java/technologies/downloads/).\n\nIt’s also recommended to use an IDE like [Visual Studio Code](https://code.visualstudio.com/) (with the Java Extension Pack) or [IntelliJ IDEA](https://www.jetbrains.com/idea/).\n\n### 🚀 How to Run the Application\n\n#### Back-End Setup\n\n```bash\n# Clone this repository\n$ git clone https://github.com/ArturColen/secure-rest-api-spring-boot-jwt.git\n\n# Navigate to the project folder\n$ cd secure-rest-api-spring-boot-jwt\n\n# Run the application\n# Option 1: If using an IDE, open the project and run the main class (annotated with @SpringBootApplication)\n# Option 2: If using the terminal, run the following command:\n$ ./mvnw spring-boot:run\n```\n\nThe server will start on port 8080 by default — you can now test the API using tools like [Insomnia](https://insomnia.rest/download) or [Postman](https://www.postman.com/downloads/).\n\n\u003cdiv id=\"technologies\"\u003e\u003c/div\u003e\n\n## 💻 Technologies\n\nThe following tools and frameworks were used in the development of this project:\n\n- [**Java**](https://docs.oracle.com/en/java/): A high-level, class-based, object-oriented programming language designed for reliability and platform independence.\n- [**Spring Boot**](https://docs.spring.io/spring-boot/docs/current/reference/html/): A framework for building production-ready applications with minimal configuration.\n- [**Spring Data JPA**](https://docs.spring.io/spring-data/jpa/docs/current/reference/html/): A module of Spring for data access using the Java Persistence API (JPA).\n- [**Spring Web**](https://docs.spring.io/spring-framework/docs/current/reference/html/web.html): A module of Spring for building web applications, including RESTful services.\n- [**Spring Security**](https://docs.spring.io/spring-security/reference/): A powerful and customizable authentication and access-control framework.\n- [**Lombok**](https://projectlombok.org/): A Java library that helps reduce boilerplate code by generating common methods like getters and setters.\n- [**H2 Database**](https://www.h2database.com/html/main.html): A lightweight, in-memory database often used for development and testing.\n- [**JWT (JSON Web Tokens)**](https://jwt.io/introduction): A compact, URL-safe means of representing claims to be transferred between two parties.\n- [**Auth0**](https://auth0.com/docs): A platform for implementing authentication and authorization in applications.\n\n\u003cdiv id=\"author\"\u003e\u003c/div\u003e\n\n## 👨🏻‍💻 Author\n\n---\n\n| [\u003cimg loading=\"lazy\" src=\"https://avatars.githubusercontent.com/u/96635074?v=4\" width=115\u003e\u003cbr\u003e\u003csub\u003eArtur Bomtempo\u003c/sub\u003e](https://arturbomtempo.dev/) |\n| :--------------------------------------------------------------------------------------------------------------------------------------------------: |\n\nDeveloped by Artur Bomtempo 👋🏻. Get in touch:\n\n[![Gmail Badge](https://img.shields.io/badge/-arturbcolen@gmail.com-D14836?style=flat-square\u0026logo=Gmail\u0026logoColor=white\u0026link=mailto:arturbcolen@gmail.com)](mailto:arturbcolen@gmail.com)\n[![LinkedIn Badge](https://img.shields.io/badge/-Artur%20Bomtempo-0A66C2?style=flat-square\u0026logo=LinkedIn\u0026logoColor=white\u0026link=https://www.linkedin.com/in/artur-bomtempo/)](https://www.linkedin.com/in/artur-bomtempo/)\n[![Instagram Badge](https://img.shields.io/badge/-@arturbomtempo.dev-E4405F?style=flat-square\u0026logo=Instagram\u0026logoColor=white\u0026link=https://www.instagram.com/arturbomtempo.dev/)](https://www.instagram.com/arturbomtempo.dev/)\n\n\u003cdiv id=\"license\"\u003e\u003c/div\u003e\n\n## 📜 License\n\nCopyright (c) 2025 Artur Bomtempo Colen\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farturbomtempo-learning%2Fsecure-rest-api-spring-boot-jwt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farturbomtempo-learning%2Fsecure-rest-api-spring-boot-jwt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farturbomtempo-learning%2Fsecure-rest-api-spring-boot-jwt/lists"}