{"id":20904628,"url":"https://github.com/ollide/spring-discourse-sso-boot","last_synced_at":"2025-09-06T19:41:45.910Z","repository":{"id":70073386,"uuid":"210837631","full_name":"ollide/spring-discourse-sso-boot","owner":"ollide","description":"Discourse SSO for Spring Boot","archived":false,"fork":false,"pushed_at":"2019-09-25T15:55:14.000Z","size":36,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-03-12T21:27:42.769Z","etag":null,"topics":["discourse","discourse-sso","spring-autoconfigurations","spring-boot-2","sso"],"latest_commit_sha":null,"homepage":null,"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/ollide.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":"2019-09-25T12:19:09.000Z","updated_at":"2025-02-17T09:15:55.000Z","dependencies_parsed_at":"2023-03-04T02:45:44.791Z","dependency_job_id":null,"html_url":"https://github.com/ollide/spring-discourse-sso-boot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ollide/spring-discourse-sso-boot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ollide%2Fspring-discourse-sso-boot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ollide%2Fspring-discourse-sso-boot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ollide%2Fspring-discourse-sso-boot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ollide%2Fspring-discourse-sso-boot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ollide","download_url":"https://codeload.github.com/ollide/spring-discourse-sso-boot/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ollide%2Fspring-discourse-sso-boot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273955452,"owners_count":25197578,"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","status":"online","status_checked_at":"2025-09-06T02:00:13.247Z","response_time":2576,"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":["discourse","discourse-sso","spring-autoconfigurations","spring-boot-2","sso"],"created_at":"2024-11-18T13:18:10.739Z","updated_at":"2025-09-06T19:41:45.889Z","avatar_url":"https://github.com/ollide.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Discourse SSO for Spring (Boot) Security\n\nWith this library you can use Discourse as a SSO provider for your Spring\n(Boot) application.\n\n## Discourse SSO Provider\n\nThe Discourse SSO provider is described on\n[meta.discourse.org](https://meta.discourse.org/t/using-discourse-as-a-sso-provider/32974).\n\nDiscourse SSO provider must be enabled and configured with a (site specific) secret inside the admin settings.\n\n![Discourse SSO Configuration](images/discourse_config.png)\n\n### SSO Flow Summary\n\n1. Redirect to `DISCOURSE_ROOT_URL/session/sso_provider?sso=PAYLOAD\u0026sig=SIGNATURE`, where\n   - `sso` is a Base64 \u0026 URL encoded payload consisting of a `nonce` and a `return_sso_url`\n   - `sig` is a HMAC-SHA256 signature of the Base64 encoded payload\n2. Login procedure or instant redirect from Discourse to the `return_sso_url`\n3. Validate and process response parameters `sso` and `sig`\n   - Compute signature of `sso` and compare with `sig`\n   - Validate `sso.nonce`\n   - Create Spring Security Authentication from `sso` payload\n\n## spring-discourse-sso-autoconfigure\n\nThis project comes with AutoConfiguration support.\n\n- Add `spring-discourse-sso-autoconfigure` dependency:\n\n```\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.ollide\u003c/groupId\u003e\n    \u003cartifactId\u003espring-discourse-sso-autoconfigure\u003c/artifactId\u003e\n    \u003cversion\u003eCURRENT_RELEASE\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n- Configure `spring-discourse-sso` inside your `application.properties`:\n\n```\ndiscourse.sso.secret=***************\ndiscourse.sso.discourseUrl=https://\u003c\u003cDISCOURSE_DOMAIN\u003e\u003e/session/sso_provider\n```\n\n- Optional customizations:\n\n  - The application's login endpoint defaults to `/login/discourse` and can\n  be customized with the property `discourse.sso.loginPath`\n  \n  - The `return_sso_url` defaults to `/login/discourse/success` and can be\n  customized with the property `discourse.sso.returnPath`\n\n## spring-discourse-sso\n\nIf you don't want to use AutoConfiguration support, you must use\n`spring-discourse-sso` directly:\n\n```\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.ollide\u003c/groupId\u003e\n    \u003cartifactId\u003espring-discourse-sso\u003c/artifactId\u003e\n    \u003cversion\u003eCURRENT_RELEASE\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nThe key components to look for are:\n- `DiscourseSigner`: Takes the SSO secret, signs \u0026 validates the payloads\n- `SsoEndpoint`: Triggers the redirect to Discourse\n- `DiscourseSsoVerificationFilter`: ServletFilter for the response, validates and attempts authentication\n- `DiscoursePrincipal`: The Principal that can be accessed through Spring's SecurityContext after successful\nauthentication\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Follide%2Fspring-discourse-sso-boot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Follide%2Fspring-discourse-sso-boot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Follide%2Fspring-discourse-sso-boot/lists"}