simplesamlphp/saml2
Composer 安装命令:
composer require simplesamlphp/saml2
包简介
SAML2 PHP library from SimpleSAMLphp
README 文档
README
A PHP library for SAML2 related functionality.
It is used by several products, most notably SimpleSAMLphp and OpenConext.
Before you use it
DO NOT USE THIS LIBRARY UNLESS YOU ARE INTIMATELY FAMILIAR WITH THE SAML2 SPECIFICATION.
If you are not familiar with the SAML2 specification and are simply looking to connect your application using SAML2, you should probably use SimpleSAMLphp.
Note that the HTTP Artifact Binding and SOAP client do not work outside of SimpleSAMLphp.
Which version to pick?
The latest released version (4.x range) is the preferred version.
The 3.x branch is our LTS branch and will be supported as long as supported releases of SimpleSAMLphp are using this branch.
All other branches (3.x and earlier) are no longer supported and will not receive any maintenance or
(security) fixes. Do not use these versions.
We conform to Semantic Versioning. Be sure to check the UPGRADING.md file if you are upgrading from an older version. Here you will find instructions on how to deal with BC breaking changes between versions.
Usage
- Install with Composer, run the following command in your project:
composer require simplesamlphp/saml2:^4.0
-
Provide the required external dependencies by extending and implementing the
\SimpleSAML\SAML2\Compat\AbstractContainerthen injecting it in the ContainerSingleton (see example below). -
Make sure you've read the security section below.
-
Use at will.
Example:
// Use Composers autoloading require 'vendor/autoload.php'; // Implement the Container interface (out of scope for example) require 'container.php'; \SimpleSAML\SAML2\Compat\ContainerSingleton::setContainer($container); // Create Issuer $issuer = new \SimpleSAML\SAML2\XML\saml\Issuer('https://sp.example.edu'); // Set up an AuthnRequest $request = new \SimpleSAML\SAML2\XML\samlp\AuthnRequest( $issuer, IDValue::generateId(), null, 'https://idp.example.edu' ); // Send it off using the HTTP-Redirect binding $binding = new \SimpleSAML\SAML2\HTTPRedirect(); $binding->send($request);
License
This library is licensed under the LGPL license version 2.1. For more details see LICENSE.
simplesamlphp/saml2 适用场景与选型建议
simplesamlphp/saml2 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 18.15M 次下载、GitHub Stars 达 304, 最近一次更新时间为 2013 年 11 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 simplesamlphp/saml2 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 simplesamlphp/saml2 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 18.15M
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 305
- 点击次数: 30
- 依赖项目数: 40
- 推荐数: 0
其他信息
- 授权协议: LGPL-2.1-or-later
- 更新时间: 2013-11-05