{"id":26937116,"url":"https://github.com/avinash4231/authentication-on-restapi-using-spring-boot","last_synced_at":"2026-04-30T01:35:26.003Z","repository":{"id":230388054,"uuid":"779232766","full_name":"Avinash4231/Authentication-on-RESTAPI-using-spring-boot","owner":"Avinash4231","description":"Implement authentication for a Student CRUD REST API using Spring Boot. Secure endpoints with Spring Security, ensuring only authorized users can perform create, read, update, and delete operations.","archived":false,"fork":false,"pushed_at":"2024-05-20T09:30:04.000Z","size":82,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-20T10:34:41.904Z","etag":null,"topics":["authentication","crud-operation","hibernate","jpa","jwt","rest-api","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/Avinash4231.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-03-29T10:48:39.000Z","updated_at":"2024-05-20T10:34:43.507Z","dependencies_parsed_at":null,"dependency_job_id":"71667e60-3125-4d7c-9a85-698600107b57","html_url":"https://github.com/Avinash4231/Authentication-on-RESTAPI-using-spring-boot","commit_stats":null,"previous_names":["avinash4231/student-crud-api-using-spring-boot","avinash4231/docker-student-jwt-authentication-crud-api-using-spring-boot","avinash4231/authentication-on-restapi-using-spring-boot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avinash4231%2FAuthentication-on-RESTAPI-using-spring-boot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avinash4231%2FAuthentication-on-RESTAPI-using-spring-boot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avinash4231%2FAuthentication-on-RESTAPI-using-spring-boot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avinash4231%2FAuthentication-on-RESTAPI-using-spring-boot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Avinash4231","download_url":"https://codeload.github.com/Avinash4231/Authentication-on-RESTAPI-using-spring-boot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246819784,"owners_count":20839095,"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":["authentication","crud-operation","hibernate","jpa","jwt","rest-api","spring-boot"],"created_at":"2025-04-02T13:14:23.590Z","updated_at":"2026-04-30T01:35:20.971Z","avatar_url":"https://github.com/Avinash4231.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Authentication on Student CRUD REST API using Spring Boot\n\n### Overview\nThis project demonstrates how to implement authentication for a Student CRUD (Create, Read, Update, Delete) REST API using Spring Boot. The application ensures that only authorized users can access and manipulate student records.\n\n### Features\nCRUD Operations: Create, Read, Update, and Delete student records.\nAuthentication: Secure API endpoints using Spring Security.\nDatabase Integration: Use H2 in-memory database for development and testing.\n\n### Technologies Used\nSpring Boot\nSpring Security\nSpring Data JPA\nH2 Database\nJava\nMaven\n\n### Prerequisites\nJava 8 or higher\nMaven 3.6.0 or higher\nDocker (optional, for containerization)\nSetup Instructions\n##### Clone the Repository\n```\ngit clone https://github.com/yourusername/studentcrud-auth-api.git\ncd studentcrud-auth-api\n```\n\n##### Build the Project\n```\nmvn clean install\n```\n##### Run the Application\n```\nmvn spring-boot:run\n```\n##### Access the API\nThe API will be accessible at http://localhost:8080/api/students.\n\nAuthentication\nThis application uses Spring Security to protect the API endpoints. You need to provide valid credentials to access the endpoints.\n\nDefault Credentials\nUsername: user\nPassword: password\nExample Requests\n##### Create a Student\n```\ncurl -X POST -u user:password -H \"Content-Type: application/json\" -d '{\"name\": \"John Doe\", \"email\":\"xyz@gmail.com\", \"course\":\"B.tech\", \"branch\":\"CSE\"}' \nhttp://localhost:8080/api/students\n```\n\n##### Get All Students\n```\ncurl -X GET -u user:password http://localhost:8080/api/students\n```\n\n##### Get a Student by ID\n```\ncurl -X GET -u user:password http://localhost:8080/api/students/{id}\n```\n##### Update a Student\n```\ncurl -X PUT -u user:password -H \"Content-Type: application/json\" -d '{\"name\": \"Jane Doe\", \"email\":\"Jane@gmail.com\", \"course\":\"B.tech\", \"branch\":\"CIVIL\"}'\nhttp://localhost:8080/api/students/{id}\n```\n##### Delete a Student\n```\ncurl -X DELETE -u user:password http://localhost:8080/api/students/{id}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favinash4231%2Fauthentication-on-restapi-using-spring-boot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favinash4231%2Fauthentication-on-restapi-using-spring-boot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favinash4231%2Fauthentication-on-restapi-using-spring-boot/lists"}