{"id":27204300,"url":"https://github.com/sunnysingh1231/security_configuration_with_jwt","last_synced_at":"2025-04-09T22:58:00.260Z","repository":{"id":271972720,"uuid":"915147297","full_name":"Sunnysingh1231/security_configuration_with_jwt","owner":"Sunnysingh1231","description":"This project implements JWT-based authentication using Spring Security. It provides secure user login, password encryption, and session handling with token-based authentication. Users can register with encrypted passwords and authenticate via JWT tokens to access protected endpoints.","archived":false,"fork":false,"pushed_at":"2025-03-29T02:28:34.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T22:57:57.560Z","etag":null,"topics":["java","spring-data-jpa","spring-security","springframework"],"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/Sunnysingh1231.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":"2025-01-11T05:00:40.000Z","updated_at":"2025-03-29T02:30:35.000Z","dependencies_parsed_at":"2025-01-11T06:17:58.599Z","dependency_job_id":"16065c58-92a0-42b5-8fbf-37bd252626ac","html_url":"https://github.com/Sunnysingh1231/security_configuration_with_jwt","commit_stats":null,"previous_names":["sunnysingh1231/security_configuration","sunnysingh1231/security_configuration_with_jwt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sunnysingh1231%2Fsecurity_configuration_with_jwt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sunnysingh1231%2Fsecurity_configuration_with_jwt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sunnysingh1231%2Fsecurity_configuration_with_jwt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sunnysingh1231%2Fsecurity_configuration_with_jwt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sunnysingh1231","download_url":"https://codeload.github.com/Sunnysingh1231/security_configuration_with_jwt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248125582,"owners_count":21051767,"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":["java","spring-data-jpa","spring-security","springframework"],"created_at":"2025-04-09T22:57:59.664Z","updated_at":"2025-04-09T22:58:00.143Z","avatar_url":"https://github.com/Sunnysingh1231.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Spring Security JWT Authentication API\n\n## Description\nThis project implements authentication and authorization using **Spring Security** and **JWT (JSON Web Token)**. It includes user authentication, password encoding, and secure token-based access control.\n\n## Features\n- **JWT-based Authentication**: Secure login and session handling.\n- **Spring Security Integration**: Protects endpoints using JWT.\n- **User Registration**: Saves new users with encrypted passwords.\n- **Session Handling**: Generates unique session IDs.\n\n## Technologies Used\n- **Spring Boot**\n- **Spring Security**\n- **JWT (JSON Web Token)**\n- **Spring Data JPA**\n- **MySQL Database**\n- **Maven**\n\n## Endpoints\n### Public Endpoints\n- `GET /hello` - Returns a greeting message with session ID.\n- `GET /xtoken` - Returns token-related session info.\n- `POST /login` - Authenticates user and generates JWT.\n- `POST /post` - Registers a new user with encrypted password.\n\n## Prerequisites\n- JDK 17\n- MySQL installed and running\n- Postman (for testing API requests)\n\n3. Configure **application.properties**:\n   ```properties\n   spring.datasource.url=jdbc:mysql://localhost:3306/your_database\n   spring.datasource.username=root\n   spring.datasource.password=your_password\n   jwt.secret=your_secret_key\n   ```\n\n## Notes\n- Ensure that the **database is created** before running the application.\n- Use **JWT tokens** for authentication in secured endpoints.\n- Passwords are securely stored using **BCrypt password encoding**.\n\n## Author\nThis project is built for secure user authentication using **Spring Security and JWT**.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunnysingh1231%2Fsecurity_configuration_with_jwt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsunnysingh1231%2Fsecurity_configuration_with_jwt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunnysingh1231%2Fsecurity_configuration_with_jwt/lists"}