swcc / simplesamlphp-module-authdiscourse
一个能够对Discourse服务器进行身份验证的模块
dev-master
2020-12-19 12:26 UTC
Requires
- php: >=7.2
- simplesamlphp/composer-module-installer: ~1.0
- simplesamlphp/simplesamlphp: dev-master
- webmozart/assert: ^1.4
Requires (Dev)
This package is auto-updated.
Last update: 2024-09-29 05:29:15 UTC
README
请记住,您需要将以下配置项添加到您的 simplesamlphp config/authsources.php 文件中
示例 config/authsources.php 文件
<?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>', ], ];
此外,在 Discourse 管理网站设置 (/admin/site_settings) 中启用设置 启用 SSO 提供商,并将相同的密钥字符串(在 config/authsources.php 中定义的)添加到 SSO 提供商密钥(用于散列 SSO 有效载荷)。
测试身份验证
在 SimpleSAMLphp 前端页面,转到 身份验证 选项卡,并使用链接
- 测试配置的身份验证源
然后选择 discourse 身份验证源。
预期的行为是您将被发送到 Discourse,并被要求在 Discourse 上登录。
然后您将在 SimpleSAMLphp 上进行身份验证,并看到一个类似于以下的属性集
