{"id":15747829,"url":"https://github.com/developer-guy/springboot-oauth2-sample","last_synced_at":"2026-04-19T07:33:52.063Z","repository":{"id":104883525,"uuid":"109825947","full_name":"developer-guy/springboot-oauth2-sample","owner":"developer-guy","description":"⁉️ This project is example of OAuth2 and SpringBoot .","archived":false,"fork":false,"pushed_at":"2017-11-07T12:07:29.000Z","size":66,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-14T08:04:37.678Z","etag":null,"topics":["oauth2","oauth2-client","oauth2-server","springboot"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/developer-guy.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":"2017-11-07T11:20:43.000Z","updated_at":"2018-06-05T15:09:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"ccfdbaec-7ea6-41ee-afec-378419fc86cc","html_url":"https://github.com/developer-guy/springboot-oauth2-sample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/developer-guy/springboot-oauth2-sample","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developer-guy%2Fspringboot-oauth2-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developer-guy%2Fspringboot-oauth2-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developer-guy%2Fspringboot-oauth2-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developer-guy%2Fspringboot-oauth2-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/developer-guy","download_url":"https://codeload.github.com/developer-guy/springboot-oauth2-sample/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developer-guy%2Fspringboot-oauth2-sample/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31998961,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"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":["oauth2","oauth2-client","oauth2-server","springboot"],"created_at":"2024-10-04T05:22:00.245Z","updated_at":"2026-04-19T07:33:52.025Z","avatar_url":"https://github.com/developer-guy.png","language":"Shell","readme":"# Simple Springboot OAuth2 Project\n\nThis project contains two applications.One of them oauth2-server and the other oauth2-client.Our oauth2-server project protects the oauth2-client Rest API's.If user want to send requesto to oauth2-client Rest APIs , the user must be authenticate to oauth2-server .\n\n## Getting Started\n\nBefore you started you should read these articles because this project was developed by following articles, in these articles explain the OAuth2 and the JWT technologieis :\n\nhttp://www.tinmegali.com/en/oauth2-using-spring/ \u003cbr /\u003e\nhttp://stytex.de/blog/2016/02/01/spring-cloud-security-with-oauth2/\n\n## Running\n\nFirstly , you must run oauth2-server to provide token to users.\nInside OAuth2ServerConfiguration.class you will see the client's credentials, so you can get token like this :\n\n* curl -XPOST \"trusted-app:webapp@localhost:9091/oauth/token\" -d \"grant_type=password\u0026username=user\u0026passsword=passsword\"\n\nAfter you get the access token you can send the http request to oauth2-client:\n\n* curl -X GET -H \"Authorization: Bearer access_token\" http://localhost:9090/api/hello --\u003e This request will be work.\n* curl -X GET -H \"Authorization: Bearer access_token\" http://localhost:9090/api/admin --\u003e This request will return access_denied error , becuase this user doesn't have ROLE_ADMIN role.\n\nIf you want to send request to /api/admin you should login with admin user.\n\n* curl -XPOST \"trusted-app:webapp@localhost:9091/oauth/token\" -d \"grant_type=password\u0026username=admin\u0026passsword=passsword\"\n\n## Built With\n\n* [Maven](https://maven.apache.org/) - Dependency Management \n\n## Authors\n\n* **Batuhan Apaydın** - *Initial work* - [SAHABT](https://github.com/developer-guy)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details\n\n## Acknowledgments\n\n* Hat tip to anyone who's code was used\n* Inspiration\n* etc\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeveloper-guy%2Fspringboot-oauth2-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeveloper-guy%2Fspringboot-oauth2-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeveloper-guy%2Fspringboot-oauth2-sample/lists"}