{"id":19486512,"url":"https://github.com/phxql/spring-boot-oauth2-jwt","last_synced_at":"2025-06-22T23:02:48.295Z","repository":{"id":146609038,"uuid":"172397518","full_name":"phxql/spring-boot-oauth2-jwt","owner":"phxql","description":"Example project for OAuth2 with JWT tokens in Spring Boot","archived":false,"fork":false,"pushed_at":"2019-02-25T19:19:04.000Z","size":59,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-08T08:14:25.955Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/phxql.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":"2019-02-24T22:23:04.000Z","updated_at":"2019-02-25T19:19:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"11bbc101-1437-4724-bf28-9845b5a810be","html_url":"https://github.com/phxql/spring-boot-oauth2-jwt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phxql%2Fspring-boot-oauth2-jwt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phxql%2Fspring-boot-oauth2-jwt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phxql%2Fspring-boot-oauth2-jwt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phxql%2Fspring-boot-oauth2-jwt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phxql","download_url":"https://codeload.github.com/phxql/spring-boot-oauth2-jwt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240727714,"owners_count":19848045,"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":[],"created_at":"2024-11-10T20:38:06.969Z","updated_at":"2025-02-25T18:42:51.658Z","avatar_url":"https://github.com/phxql.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Example project for OAuth2 with JWT tokens in Spring Boot \n\nThis applicaton showcases a Spring Boot Service:\n\n* issues OAuth2 tokens, encoded in JWT format, using RSA signing\n* verifies these tokens when protected endpoints are called\n* returns the RSA public key to the client so that it can validate the issued tokens\n* uses roles to protect endpoints, some endpoints are world-readable\n* implements a custom `UserDetailsService` for managing users\n* tests the whole Spring Security stuff in an integration test\n\n## curls\n\n### Issue a token\n\n```\ncurl id:secret@localhost:8080/oauth/token -d grant_type=password -d username=user2 -d password=password2 -d scope=foo\n```\n\nStore the issued `access_token` in the variable `ACCESS_TOKEN`.\n\n### Call the protected endpoint\n\n```\ncurl localhost:8080/test/user -H \"Authorization: Bearer $ACCESS_TOKEN\"\n```\n\n### Download RSA public key for token verification\n\n```\ncurl localhost:8080/oauth/token_key\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphxql%2Fspring-boot-oauth2-jwt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphxql%2Fspring-boot-oauth2-jwt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphxql%2Fspring-boot-oauth2-jwt/lists"}