{"id":21198874,"url":"https://github.com/natlibfi/discourse-crowd","last_synced_at":"2025-07-20T22:34:26.627Z","repository":{"id":28983449,"uuid":"32510000","full_name":"NatLibFi/Discourse-Crowd","owner":"NatLibFi","description":null,"archived":false,"fork":false,"pushed_at":"2023-10-24T11:55:00.000Z","size":50,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-03-14T22:22:46.774Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NatLibFi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING.GPL","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":"2015-03-19T08:40:03.000Z","updated_at":"2023-10-24T11:54:01.000Z","dependencies_parsed_at":"2025-01-21T14:42:43.184Z","dependency_job_id":"04cc6d93-6a17-4379-b3b6-cbca297e05a5","html_url":"https://github.com/NatLibFi/Discourse-Crowd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NatLibFi/Discourse-Crowd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NatLibFi%2FDiscourse-Crowd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NatLibFi%2FDiscourse-Crowd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NatLibFi%2FDiscourse-Crowd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NatLibFi%2FDiscourse-Crowd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NatLibFi","download_url":"https://codeload.github.com/NatLibFi/Discourse-Crowd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NatLibFi%2FDiscourse-Crowd/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266210916,"owners_count":23893341,"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-20T19:53:53.520Z","updated_at":"2025-07-20T22:34:26.612Z","avatar_url":"https://github.com/NatLibFi.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Single Sign On Authentication #\n\nThis package implements single sign on authentication for Discourse forum using\nthe Crowd authentication API.\n\n## Discourse Authentication ##\n\nTo set up the Discourse single sign on authentication, you must first enable it\nin the Discourse admin panel. Instructions for enabling the single sign on can\nbe found on the discourse website:\n\nhttps://meta.discourse.org/t/official-single-sign-on-for-discourse/13045\n\nThe `sso_url` should point to the `auth.php` in this package. The `sso_secret`\ncan be any value you choose, but it must be kept secret and it must be reflected\nin the configuration of this single sign on package.\n\n**Warning**: The authentication script makes a large number of HTTP requests to\nthe Discourse API (especially if it needs to create groups and modify user\ngroups). Unless the server properly configured, the authentication script may\nfail due to HTTP error 429 (Too Many Requests). This might not be a major\nproblem, however, since it can usually be solved by just trying to log in again.\n\n### Configuration ###\n\nBefore configuring the library, you need to install the library dependencies\nfor the project via composer. Easiest way to do this is to run:\n\n```\nphp -r \"readfile('https://getcomposer.org/installer');\" | php\nphp composer.phar install\n```\n\nThe configuration settings are read from the `forum_settings.json` file. Make\na copy of the sample file and rename it without the 'sample' suffix. The \nsettings file contains the following configuration options:\n\n  * `authLog` contains a path that stores authentication logs. The path is\n    path accepts `strftime()` tokens. Set to null to disable logging.\n  * `groupPrefix` is the prefix for group names imported from Crowd.\n  * `groupMaxLength` is the maximum length of group names (Discourse 1.3 allows\n    up to 20 characters).\n  * `groupTruncateLength` is the maximum length of a truncated group name.\n  * `shortGroupName` tells whether to use shorter truncated names or longer names\n    that might not be truncated. Optimal settings for `groupMaxLength` and\n    `groupTruncateLength` for `true` are `15` and `8`. For `false`, the optimal\n    values are `20` and `10`.\n  * `ssoSecret` must be set to the same value as `sso_secret` in the admin panel.\n  * `ssoUrl` is the URL path to the `auth.php` file.\n  * `ssoCallbackUrl` is the URL path to the `/session/sso_login` url in Discourse.\n  * `discourseUrl` indicates the base URL to the discourse api.\n  * `discourseUsername` is the username used by api calls (usually 'system').\n  * `discourseKey` is the api key for the username.\n  * `crowdUsername` is the username used to authenticate to the Crowd api\n  * `crowdPassword` is the password for the Crowd api user\n  * `crowdUrl` is the base URL to the crowd api\n  * `crowdLoginUrl` is the URL to the login page used to login into the Crowd\n\n## Resources ##\n\n  * [Crowd REST API documentation](https://developer.atlassian.com/display/CROWDDEV/Crowd+REST+Resources)\n  * [Discourse Single Sign On documentation](https://meta.discourse.org/t/official-single-sign-on-for-discourse/13045)\n  * [Discourse API documentation](https://meta.discourse.org/t/discourse-api-documentation/22706)\n  * [Discourse API reference implementation](https://github.com/discourse/discourse_api)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatlibfi%2Fdiscourse-crowd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnatlibfi%2Fdiscourse-crowd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatlibfi%2Fdiscourse-crowd/lists"}