{"id":20196172,"url":"https://github.com/shaikrasheed99/springboot-security-jwt-authentication","last_synced_at":"2026-05-14T21:33:04.307Z","repository":{"id":207572694,"uuid":"719579171","full_name":"shaikrasheed99/springboot-security-jwt-authentication","owner":"shaikrasheed99","description":"JWT Authentication in Springboot. ","archived":false,"fork":false,"pushed_at":"2023-11-16T13:24:14.000Z","size":113,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-13T15:08:25.203Z","etag":null,"topics":["jwt","jwt-authentication","jwt-authorization","spring-boot","spring-jwt-authentication","spring-security","spring-security-jwt","spring-security-jwt-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":"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-11-16T13:21:08.000Z","updated_at":"2023-11-16T13:23:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"b92ffd87-90a9-4ca4-ac24-bd42772307b1","html_url":"https://github.com/shaikrasheed99/springboot-security-jwt-authentication","commit_stats":null,"previous_names":["shaikrasheed99/springboot-security-jwt-authentication"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shaikrasheed99/springboot-security-jwt-authentication","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaikrasheed99%2Fspringboot-security-jwt-authentication","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaikrasheed99%2Fspringboot-security-jwt-authentication/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaikrasheed99%2Fspringboot-security-jwt-authentication/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaikrasheed99%2Fspringboot-security-jwt-authentication/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shaikrasheed99","download_url":"https://codeload.github.com/shaikrasheed99/springboot-security-jwt-authentication/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaikrasheed99%2Fspringboot-security-jwt-authentication/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33044113,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"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":["jwt","jwt-authentication","jwt-authorization","spring-boot","spring-jwt-authentication","spring-security","spring-security-jwt","spring-security-jwt-spring-boot"],"created_at":"2024-11-14T04:22:13.401Z","updated_at":"2026-05-14T21:33:04.278Z","avatar_url":"https://github.com/shaikrasheed99.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring Security JWT Authentication\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    - Login\n    - Get all users\n    - Get user by username\n\n## APIs\n\n### Signup - `/auth/signup`\n\n* `NOTE` - this API can be accessed by everyone.\n\n* Request\n\n```\ncurl --location --request POST 'http://localhost:8080/auth/signup' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n    \"username\": \"test_username\",\n    \"password\": \"test_password\",\n    \"role\": \"ROLE_test\",\n    \"firstname\": \"test_firstname\",\n    \"lastname\": \"test_lastname\"\n}'\n```\n\n* Response\n\n```\n{\n    \"status\": \"success\",\n    \"code\": \"CREATED\",\n    \"message\": \"user has created successfully\",\n    \"data\": {\n        \"token\": \"JWT_TOKEN\"\n    }\n}\n```\n\n### Login - `/auth/login`\n\n* Request\n\n```\ncurl --location --request POST 'http://localhost:8080/auth/login' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n    \"username\": \"test_username\",\n    \"password\": \"test_password\"\n}'\n```\n\n* Response\n\n```\n{\n    \"status\": \"success\",\n    \"code\": \"OK\",\n    \"message\": \"user has logged in successfully\",\n    \"data\": {\n        \"token\": \"JWT_TOKEN\"\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: Bearer JWT_TOKEN' \\\n```\n\n* Response\n\n```\n{\n    \"status\": \"success\",\n    \"code\": \"OK\",\n    \"message\": \"fetched users details successfully!!\",\n    \"data\": {\n        \"users\": [\n            {\n                \"username\": \"test_username\",\n                \"password\": \"test_password\",\n                \"firstname\": \"test_firstname\",\n                \"lastname\": \"test_lastname\",\n                \"role\": \"ROLE_test\"\n            }\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: Bearer JWT_TOKEN' \\\n```\n\n* Response\n\n```\n{\n    \"status\": \"success\",\n    \"code\": \"OK\",\n    \"message\": \"fetched user details successfully!!\",\n    \"data\": {\n        \"user\": {\n            \"username\": \"test_username\",\n            \"password\": \"test_password\",\n            \"firstname\": \"test_firstname\",\n            \"lastname\": \"test_lastname\",\n            \"role\": \"ROLE_test\"\n        }\n    }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaikrasheed99%2Fspringboot-security-jwt-authentication","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshaikrasheed99%2Fspringboot-security-jwt-authentication","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaikrasheed99%2Fspringboot-security-jwt-authentication/lists"}