{"id":25124597,"url":"https://github.com/devang-sharma609/spring_security","last_synced_at":"2025-08-02T00:03:05.003Z","repository":{"id":274188317,"uuid":"922177040","full_name":"Devang-sharma609/Spring_Security","owner":"Devang-sharma609","description":"Spring security using JWT Tokens, with Google and GitHub Authentication","archived":false,"fork":false,"pushed_at":"2025-01-26T03:17:29.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T17:51:24.857Z","etag":null,"topics":["java","spring","spring-security","springboot"],"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/Devang-sharma609.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-25T14:25:46.000Z","updated_at":"2025-03-08T02:44:46.000Z","dependencies_parsed_at":"2025-04-02T17:42:30.652Z","dependency_job_id":"46ed621f-9913-46d3-a90c-ebceaad46fec","html_url":"https://github.com/Devang-sharma609/Spring_Security","commit_stats":null,"previous_names":["devang-sharma609/spring_security"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Devang-sharma609/Spring_Security","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devang-sharma609%2FSpring_Security","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devang-sharma609%2FSpring_Security/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devang-sharma609%2FSpring_Security/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devang-sharma609%2FSpring_Security/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Devang-sharma609","download_url":"https://codeload.github.com/Devang-sharma609/Spring_Security/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devang-sharma609%2FSpring_Security/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268315816,"owners_count":24231056,"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","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["java","spring","spring-security","springboot"],"created_at":"2025-02-08T08:16:58.226Z","updated_at":"2025-08-02T00:03:04.913Z","avatar_url":"https://github.com/Devang-sharma609.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring Security Project 🚀\n\nWelcome to the **Spring Security Project**! This repository demonstrates the implementation of **Spring Security** for securing Java-based applications. It shows how to configure authentication, authorization, and other security measures to protect web applications from unauthorized access.\n\n## Table of Contents 🗂️\n- [Introduction](#introduction)\n- [Features](#features)\n- [Getting Started](#getting-started)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Configuration](#configuration)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Introduction 🎯\nSpring Security is a powerful and customizable authentication and access control framework for Java applications. This project serves as a guide to help developers integrate **Spring Security** into their applications with a focus on security best practices, such as:\n- Authentication (basic and JWT token-based)\n- Authorization (role-based access control)\n- CSRF protection\n- Session management\n- Secure password hashing\n\nThe goal of this project is to provide developers with a **working example** of how to integrate Spring Security with their own applications and enable strong security measures.\n\n## Features ✨\n- **Authentication**: Secure login and token-based authentication (JWT).\n- **Authorization**: Role-based access control with custom permission rules.\n- **CSRF Protection**: Built-in CSRF (Cross-Site Request Forgery) prevention.\n- **Password Encoding**: Secure password storage with BCrypt.\n- **Custom Security Configurations**: Flexibility to configure your own authentication mechanisms.\n- **Session Management**: Secure handling of user sessions and logout functionality.\n\n## Getting Started 🚀\n\nTo get started with this project, clone this repository to your local machine and follow the steps to set up the Spring Security configuration.\n\n### Prerequisites 🔧\n- Java 11 or higher\n- Maven or Gradle\n- A database (optional, depending on your setup)\n  \n### Installation ⚙️\n1. Clone the repository:\n    ```bash\n    git clone https://github.com/Devang-sharma609/Spring_Security.git\n    ```\n\n2. Navigate into the project directory:\n    ```bash\n    cd Spring_Security\n    ```\n\n3. Build the project using Maven or Gradle:\n    - Maven:\n      ```bash\n      mvn clean install\n      ```\n    - Gradle:\n      ```bash\n      gradle build\n      ```\n\n4. Run the application:\n    ```bash\n    mvn spring-boot:run\n    ```\n    or\n    ```bash\n    gradle bootRun\n    ```\n\nNow, your application should be up and running locally!\n\n## Usage ⚡\nAfter setting up the project, you can test authentication and authorization functionality using the following API endpoints:\n\n- **POST** `/login`: Log in with user credentials (returns JWT token).\n- **GET** `/user`: Get user info (accessible only if authenticated).\n- **GET** `/admin`: Admin page (accessible only for users with `ROLE_ADMIN`).\n\nYou can customize these endpoints or add more depending on your application’s needs.\n\n## Configuration ⚙️\n\nThis repository provides a flexible configuration file (`application.properties` or `application.yml`) for managing different Spring Security properties. You can configure:\n\n- JWT token secret and expiration time.\n- Roles and access rules.\n- Login and logout behavior.\n- Session settings and CSRF configurations.\n\n### Example `application.properties`:\n\n```properties\n# JWT Configuration\njwt.secret=your_jwt_secret_key\njwt.expiration=3600000\n\n# Spring Security Settings\nspring.security.user.name=user\nspring.security.user.password=secretpassword\nspring.security.roles=USER,ADMIN\n```\n\nMake sure to modify the configuration according to your environment.\n\n## Contributing 🤝\nWe welcome contributions to this project! If you’d like to contribute, please follow these steps:\n\n1. Fork the repository.\n2. Create a feature branch.\n3. Commit your changes.\n4. Open a pull request with a description of what you’ve implemented or changed.\n\nWe encourage you to follow the guidelines for coding style and commit messages.\n\n## License 📝\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Credits\nI made this Spring Security Component for NavGo Project by Abhyudaya Coding Club™\n\n## Contact\nFor any queries feel free to mail me at: [Email](https://mailto:devang122indmp@gmail.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevang-sharma609%2Fspring_security","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevang-sharma609%2Fspring_security","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevang-sharma609%2Fspring_security/lists"}