niif/simplesamlphp-module-attributecollector
Composer 安装命令:
composer require niif/simplesamlphp-module-attributecollector
包简介
Collect attributes from backend databases like sql or ldap
README 文档
README
simplesamlphp auth proc filter, that get attributes from backend database and set to attributes array.
This code is delivered from: https://forja.rediris.es/svn/confia/attributecollector
Basic configuration
Configure this module as an Auth Proc Filter. More info at http://rnd.feide.no/content/authentication-processing-filters-simplesamlphp
Example
In the following example the filter is configured for only one hosted IdP editing the file saml20-idp-hosted
$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', ) ) ), ... ) );
Configuration Options explained
The filter needs the following options:
- class: The filter class. Allways: 'attributecollector:AttributeCollector'
- uidfield: The name of the field used as an unique user identifier. The configured collector recives this uid so it can search for extra attributes.
- collector: The configuration of the collector used to retrieve the extra attributes
The following option is optional:
- existing: Tell the filter what to do when a collected attribute already exists in the user attributes. Values can be: 'preserve': Ignore collected attribute and preserve the old one. This one is the default behaviour. 'replace': Ignore original attribute and replace it with the collected one. 'merge': Merge the collected attribute into the array of the original one.
Collector Configuration Options explained
The collector configuration array needs at least one option:
- class: The collector class.
Some other options may be needed by the collector, refer to the collector documentation.
niif/simplesamlphp-module-attributecollector 适用场景与选型建议
niif/simplesamlphp-module-attributecollector 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 112 次下载、GitHub Stars 达 1, 最近一次更新时间为 2016 年 02 月 28 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 niif/simplesamlphp-module-attributecollector 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 niif/simplesamlphp-module-attributecollector 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 112
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2016-02-28