{"id":15107527,"url":"https://github.com/sandundil2002/jwt-authentication","last_synced_at":"2026-03-10T07:04:26.215Z","repository":{"id":254064795,"uuid":"845347305","full_name":"sandundil2002/JWT-Authentication","owner":"sandundil2002","description":"This project is demonstrates how to implement JWT (JSON Web Token) based authentication in springboot. ","archived":false,"fork":false,"pushed_at":"2024-09-03T13:03:13.000Z","size":75,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-11T12:50:38.286Z","etag":null,"topics":["ajax","bootstrap","css","html","java","javascript","jpa","jquery","jwt-authentication","maven","mysql","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sandundil2002.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-08-21T04:32:26.000Z","updated_at":"2024-09-10T05:44:21.000Z","dependencies_parsed_at":"2025-02-08T05:42:19.548Z","dependency_job_id":null,"html_url":"https://github.com/sandundil2002/JWT-Authentication","commit_stats":null,"previous_names":["sandundil2002/jwt-authentication"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sandundil2002/JWT-Authentication","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandundil2002%2FJWT-Authentication","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandundil2002%2FJWT-Authentication/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandundil2002%2FJWT-Authentication/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandundil2002%2FJWT-Authentication/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sandundil2002","download_url":"https://codeload.github.com/sandundil2002/JWT-Authentication/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandundil2002%2FJWT-Authentication/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30326893,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T05:25:20.737Z","status":"ssl_error","status_checked_at":"2026-03-10T05:25:17.430Z","response_time":106,"last_error":"SSL_read: 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":["ajax","bootstrap","css","html","java","javascript","jpa","jquery","jwt-authentication","maven","mysql","spring-boot"],"created_at":"2024-09-25T21:25:18.280Z","updated_at":"2026-03-10T07:04:26.194Z","avatar_url":"https://github.com/sandundil2002.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://git.io/typing-svg\"\u003e\u003cimg src=\"https://readme-typing-svg.herokuapp.com?font=Fira+Code\u0026weight=600\u0026size=50\u0026pause=1000\u0026center=true\u0026vCenter=true\u0026width=835\u0026height=70\u0026lines=JWT+Authentication\" alt=\"Typing SVG\" /\u003e\u003c/a\u003e\n\n\u003cp\u003eThis project demonstrates a comprehensive implementation of JWT (JSON Web Token) based authentication in a Spring Boot application. The project is structured with multiple components to handle various aspects of the application, ensuring clean and maintainable code.\u003c/p\u003e\n\n\u003ch2\u003eProject Structure\u003c/h2\u003e\n\n* Entity: Defines the data model and maps it to the database.\n* DTO (Data Transfer Object): Facilitates the transfer of data between different layers of the application.\n* Repository: Handles all database operations and data persistence.\n* Service: Contains the business logic and interacts with the Repository layer.\n* Config: Configures security settings, including JWT authentication and authorization.\n* Controller: Manages incoming HTTP requests, processes them, and returns appropriate responses.\n* Util: Contains utility classes for various operations, particularly for handling JWT tokens.\n\n\u003ch2\u003eFeatures\u003c/h2\u003e\n\n* JWT Generation: Generates JWT tokens upon successful authentication, which are then used for securing subsequent requests.\n* User Authentication: Validates user credentials and issues JWT tokens, ensuring secure access to protected resources.\n\n\u003ch2\u003eTechnologies Used\u003c/h2\u003e\n\n* Spring Boot: Framework to create standalone, production-grade Spring-based applications.\n* Spring Security: Provides authentication and authorization support, securing the application.\n* JSON Web Token (JWT): Mechanism for securely transmitting information between parties as a JSON object.\n* JPA/Hibernate: ORM (Object Relational Mapping) framework to interact with the database.\n* MySQL (or any other database): Relational database for storing application data.\n* Maven: Build automation tool for managing project dependencies.\n\n\u003ch2\u003eGetting Started\u003c/h2\u003e\n\u003ch3\u003ePrerequisites\u003c/h3\u003e\n\n* JDK 17 or later: Ensure that your system is running Java Development Kit 17 or a later version.\n* Maven 3.6 or later: Maven is required to manage dependencies and build the project.\n* MySQL (or any other database): A database to store application data.\n* IDE: Use an Integrated Development Environment like IntelliJ IDEA or Eclipse for development.\n\n\u003ch3\u003eInstallation and Setup\u003c/h3\u003e\n\u003ch4\u003eClone the Repository:\u003c/h4\u003e\n\n    git clone https://github.com/sandundil2002/JWT-Authentication.git\n    cd JWT-Authentication\n\n\u003ch4\u003eConfigure the Database:\u003c/h4\u003e\n\n* Update the application.properties file with your database connection details.\n\n      spring.application.name=JWT-Authentication\n      spring.datasource.url = jdbc:mysql://localhost:3306/yourDatabaseName?createDatabaseIfNotExist=true\u0026allowPublicKeyRetrieval=true\u0026useSSL=false\n      spring.datasource.username=yourDatabaseUsername\n      spring.datasource.password = yourDatabasePassword\n      spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL8Dialect\n      spring.jpa.hibernate.ddl-auto = update\n      spring.datasource.driver-class-name =com.mysql.cj.jdbc.Driver\n      spring.jpa.open-in-view=false\n      spring.jpa.show-sql= true\n      jwt.secret=e#s$p%o$r^t9\n\n\u003ch4\u003eBuild the Project:\u003c/h4\u003e\n\n    mvn clean install\n\n\u003ch4\u003eRun the Application:\u003c/h4\u003e\n\n    mvn spring-boot:run\n\n\u003ch4\u003eAccess the Application:\u003c/h4\u003e\n\n* The application will be available at http://localhost:8080.\n\n\u003ch2\u003eAPI Documentation\u003c/h2\u003e\n\n\u003cp\u003eYou can view and interact with the API using Postman. Detailed documentation for all endpoints, including request formats and expected responses, is available via the following link:\u003c/p\u003e\n\n\u003ca href=\"https://documenter.getpostman.com/view/35384990/2sAXjDevXr\"\u003ePostman API Documentation\u003c/a\u003e\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandundil2002%2Fjwt-authentication","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsandundil2002%2Fjwt-authentication","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandundil2002%2Fjwt-authentication/lists"}