{"id":19656311,"url":"https://github.com/daggerok/spring-boot-oauth2-apps","last_synced_at":"2026-05-16T17:06:33.064Z","repository":{"id":151042046,"uuid":"253103280","full_name":"daggerok/spring-boot-oauth2-apps","owner":"daggerok","description":null,"archived":false,"fork":false,"pushed_at":"2020-04-05T00:50:00.000Z","size":62,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-28T08:45:11.283Z","etag":null,"topics":["github-action","github-action-docker","github-actions","github-actions-docker","jib-maven-plugin","oauth2","oauth2-client","oauth2-client-credentials-grant","oauth2-resource-server","oauth2-server","spring-cloud-starter-oauth2"],"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/daggerok.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":"2020-04-04T21:36:44.000Z","updated_at":"2020-04-05T00:50:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"63e2d969-855d-4d11-8e6a-66f88036b57d","html_url":"https://github.com/daggerok/spring-boot-oauth2-apps","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/daggerok/spring-boot-oauth2-apps","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fspring-boot-oauth2-apps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fspring-boot-oauth2-apps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fspring-boot-oauth2-apps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fspring-boot-oauth2-apps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daggerok","download_url":"https://codeload.github.com/daggerok/spring-boot-oauth2-apps/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fspring-boot-oauth2-apps/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33111499,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["github-action","github-action-docker","github-actions","github-actions-docker","jib-maven-plugin","oauth2","oauth2-client","oauth2-client-credentials-grant","oauth2-resource-server","oauth2-server","spring-cloud-starter-oauth2"],"created_at":"2024-11-11T15:27:24.898Z","updated_at":"2026-05-16T17:06:33.041Z","avatar_url":"https://github.com/daggerok.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# spring-boot-oauth2-apps [![CI](https://github.com/daggerok/spring-boot-oauth2-apps/workflows/CI/badge.svg)](https://github.com/daggerok/spring-boot-oauth2-apps/actions/)\nYet another... in progress...\n\n```\n     +-----+                                 +-----+                               +---------------+\n     |  B  | -- (1) protected resource ----\u003e |     | -- (4) authorization grant -\u003e | authorization |\n     |  R  | \u003c- (2) unauthorized ----------- |  A  | \u003c- (5) access token --------- |     server    |\n \\O_ |  O  | -- (3) authorization ---------\u003e |     |                               +---------------+\n  |  |  W  |                                 |  P  |\n / \\ |  S  |                                 |     |                               +---------------+\n     |  E  | \u003c- (8) protected resource ----- |  P  | -- (6) access token --------\u003e |    resource   |\n     |  R  |                                 |     | \u003c- (7) protected resource --- |     server    |\n     +-----+                                 +-----+                               +---------------+\n```\n\n## build, run and test\n\n1. using java 14, build and run apps:\n   ```bash\n   brew cask reinstall adoptopenjdk14\n   ./mvnw clean ; ./mvnw -pl :authorization-server,:app\n   java -jar authorization-server/target/*.jar \u0026\n   java -jar app/target/*.jar \u0026\n   ```\n1. open in browser: http://127.0.0.1:8080\n1. click register\n1. you should be redirected with url: http://localhost:8081/oauth/authorize?grant_type=authorization_code\u0026response_type=code\u0026client_id=first-client\n1. authenticate with: `enduser` / `enduserpassword`\n1. you should be redirected on authorization page\n1. allow or deny...\n1. once allowed, click Authorize\n1. you should be redirected back to target page with authorization code present in a browser url\n\n### jib\n\n```bash\n./mvnw clean package jib:docker\n```\n\n## step 1\n\n__\n\n```bash\njdk14\n./mvnw -f step-1/step-1-authorization-server\njava -jar ./step-1/step-1-authorization-server/target/*.jar\ncurl -sS first-client:noonewilleverguess@0:8081/oauth/token -d grant_type=client_credentials -d scope=any\ncurl -sS first-client:noonewilleverguess@0:8081/oauth/token -d grant_type=password -d scope=any -d username=enduser -d password=enduserpassword\n```\n\n## step 0\n\n__\n\n```bash\njdk14\n./mvnw -f step-0/step-0-authorization-server\njava -jar ./step-0/step-0-authorization-server/target/*.jar\ncurl first-client:noonewilleverguess@localhost:8081/oauth/token -dgrant_type=client_credentials -dscope=any\n```\n\n# resources\n\n* [Spring Security OAuth2 Authentication Server reference](https://docs.spring.io/spring-security-oauth2-boot/docs/current/reference/htmlsingle/)\n* [Spring Boot 2 – OAuth2 Auth and Resource Server](https://howtodoinjava.com/spring-boot2/oauth2-auth-server/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaggerok%2Fspring-boot-oauth2-apps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaggerok%2Fspring-boot-oauth2-apps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaggerok%2Fspring-boot-oauth2-apps/lists"}