A module that is able to perform authentication against a Discourse server
Remember to configure your simplesamlphp
config/authsources.php file with the following configuration items:
||The SSO secret defined in your Discourse configuration (
||The URL of your Discourse server|
<?php $config = [ // This is a authentication source which handles admin authentication. 'admin' => [ 'core:AdminPassword', ], // This is the authentication source using the Discourse authentication. 'discourse-sso' => [ 'authdiscourse:Discourse', 'url' => 'https://discourse.your-domain.org', 'secret' => '<your-sso-secret>', ], ];
Also, under Discourse admin site settings (/admin/site_settings) enable setting
enable sso provider and add the same secret string (the one defined in
sso provider secrets (used to hash SSO payloads).
On the SimpleSAMLphp frontpage, go to the Authentication tab, and use the link:
- Test configured authentication sources
Then choose the discourse authentication source.
Expected behaviour would then be that you are sent to Discourse, and asked to login on Discourse.
You will then be authenticated in SimpleSAMLphp and see an attribute set similar to this: