{"id":20196176,"url":"https://github.com/shaikrasheed99/springboot-security-basics","last_synced_at":"2025-03-03T08:13:51.195Z","repository":{"id":206908330,"uuid":"704982747","full_name":"shaikrasheed99/springboot-security-basics","owner":"shaikrasheed99","description":"Springboot Security Basics application","archived":false,"fork":false,"pushed_at":"2023-11-13T04:10:45.000Z","size":90,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-13T19:38:57.268Z","etag":null,"topics":["spring-security","springboot","springboot-security","springsecurity"],"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/shaikrasheed99.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-10-14T17:36:06.000Z","updated_at":"2025-01-03T06:12:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"a25f9b13-e58d-4e7d-9566-f775b62ca819","html_url":"https://github.com/shaikrasheed99/springboot-security-basics","commit_stats":null,"previous_names":["shaikrasheed99/springboot-security-basics"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaikrasheed99%2Fspringboot-security-basics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaikrasheed99%2Fspringboot-security-basics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaikrasheed99%2Fspringboot-security-basics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaikrasheed99%2Fspringboot-security-basics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shaikrasheed99","download_url":"https://codeload.github.com/shaikrasheed99/springboot-security-basics/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241629770,"owners_count":19993710,"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":["spring-security","springboot","springboot-security","springsecurity"],"created_at":"2024-11-14T04:22:14.623Z","updated_at":"2025-03-03T08:13:51.071Z","avatar_url":"https://github.com/shaikrasheed99.png","language":"Java","readme":"# Spring Security Basics application\n\n## Gradle based spring boot application which provide below APIs of the users using test driven development.\n\n## APIs of the Application\n\n    - Signup\n    - Authenticated\n    - Get all users\n    - Get user by username\n\n## APIs\n\n### Signup - `/signup`\n\n* `NOTE` - this API can be accessed by everyone.\n\n* Request\n\n```\ncurl --location --request POST 'http://localhost:8080/signup' \\\n--header 'Content-Type: application/json' \\\n--data '{\n    \"username\": \"test_username\",\n    \"password\": \"test_password\",\n    \"role\": \"ROLE_user\",\n    \"firstname\": \"test_firstname\",\n    \"lastname\": \"test_lastname\"\n}'\n```\n\n* Response\n\n```\n{\n    \"code\": \"CREATED\",\n    \"status\": \"success\",\n    \"data\": {\n        \"message\": \"user successfully signed up\"\n    }\n}\n```\n\n### Authenticated - `/authenticated`\n\n* `NOTE` - this API can be accessed by only authenticated users\n\n* Request\n\n```\ncurl --location --request GET 'http://localhost:8080/authenticated' \\\n--header 'Authorization: Basic Y2FwdGFpbjpwYXNzd29yZA=='\n```\n\n* Response\n\n```\n{\n    \"code\": \"OK\",\n    \"status\": \"success\",\n    \"data\": {\n        \"message\": \"This API is accessed by only authenticated users\"\n    }\n}\n```\n\n### Get all users - `/users`\n\n* `NOTE` - this API can be accessed by authenticated users who are having admin role.\n\n* Request\n\n```\ncurl --location --request GET 'http://localhost:8080/users' \\\n--header 'Authorization: Basic aXJvbm1hbjpwYXNzd29yZA=='\n```\n\n* Response\n\n```\n{\n    \"code\": \"OK\",\n    \"status\": \"success\",\n    \"data\": [\n        {\n            \"username\": \"test_username\",\n            \"role\": \"ROLE_user\",\n            \"firstname\": \"test_firstname\",\n            \"lastname\": \"test_lastname\"\n        }\n    ]\n}\n```\n\n### Get User by username - `/users/{username}`\n\n* `NOTE` - this API can be accessed by authenticated users who are having admin and user roles.\n\n* Request\n\n```\ncurl --location --request GET 'http://localhost:8080/users/test_username' \\\n--header 'Authorization: Basic dGhvcjpwYXNzd29yZA=='\n```\n\n* Response\n\n```\n{\n    \"code\": \"OK\",\n    \"status\": \"success\",\n    \"data\": {\n        \"username\": \"test_username\",\n        \"role\": \"ROLE_user\",\n        \"firstname\": \"test_firstname\",\n        \"lastname\": \"test_lastname\"\n    }\n}\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaikrasheed99%2Fspringboot-security-basics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshaikrasheed99%2Fspringboot-security-basics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaikrasheed99%2Fspringboot-security-basics/lists"}