niif

此包最新版本(v1.0.0)没有可用的许可证信息。

从后端数据库(如sql或ldap)收集属性

安装: 90

依赖项: 0

建议者: 0

安全: 0

星标: 1

关注者: 8

分支: 3

开放问题: 0

类型:simplesamlphp-module

v1.0.0 2016-02-28 15:58 UTC

This package is auto-updated.

Last update: 2024-09-08 01:25:57 UTC


README

simplesamlphp认证处理过滤器,从后端数据库获取属性并设置到属性数组中。

此代码来自:https://forja.rediris.es/svn/confia/attributecollector

基本配置

将此模块配置为认证处理过滤器。更多信息请参阅http://rnd.feide.no/content/authentication-processing-filters-simplesamlphp

示例

在以下示例中,过滤器仅配置用于编辑saml20-idp-hosted文件的一个托管IdP

$metadata = array(

		'ssp-idp' => array(

		...

				'authproc' => array(
						10 => array(
								'existing' => 'preserve',
								'class' => 'attributecollector:AttributeCollector',
								'uidfield' => 'subject',
								'collector' => array(
										'class' => 'attributecollector:SQLCollector',
										'dsn' => 'pgsql:host=localhost;dbname=ssp-extra',
										'username' => 'ssp-extra',
										'password' => 'ssp-extra',
										'query' => 'SELECT * from extra where subject=:uidfield',
								)
						)
				),

		...

		)
);

配置选项说明

过滤器需要以下选项

  • class: 过滤器类。总是:'attributecollector:AttributeCollector'
  • uidfield: 用作唯一用户标识符的字段名称。配置的收集器接收到此uid,以便可以搜索额外的属性。
  • collector: 用于检索额外属性的收集器配置

以下选项是可选的

  • existing: 当收集的属性已存在于用户属性中时,告诉过滤器要做什么。值可以是:'preserve':忽略收集的属性并保留旧的。这是默认行为。'replace':忽略原始属性并用收集的属性替换它。'merge':将收集的属性合并到原始属性的数组中。

收集器配置选项说明

收集器配置数组至少需要一个选项

  • class: 收集器类。

收集器可能需要其他一些选项,请参阅收集器文档。