simplesamlphp / saml2
SAML2 PHP library from SimpleSAMLphp
Installs: 13 353 442
Dependents: 37
Suggesters: 0
Security: 5
Stars: 284
Watchers: 38
Forks: 135
Open Issues: 12
Type:simplesamlphp-xmlprovider
Requires
- php: ^8.1
- ext-date: *
- ext-dom: *
- ext-filter: *
- ext-openssl: *
- ext-pcre: *
- ext-soap: *
- ext-zlib: *
- nyholm/psr7: ^1.8
- psr/clock: ^1.0
- psr/http-message: ^2.0
- psr/log: ^2.0 || ^3.0
- simplesamlphp/assert: ~1.3.1
- simplesamlphp/xml-common: ~1.18.0
- simplesamlphp/xml-security: ~1.9.5
- simplesamlphp/xml-soap: ~1.5.3
Requires (Dev)
- ext-intl: *
- beste/clock: ^3.0
- mockery/mockery: ^1.6
- simplesamlphp/simplesamlphp-test-framework: ^1.7
- v5.0.0-alpha.17
- v5.0.0-alpha.16
- v5.0.0-alpha.15
- v5.0.0-alpha.14
- v5.0.0-alpha.13
- v5.0.0-alpha.12
- v5.0.0-alpha.11
- v5.0.0-alpha.10
- v5.0.0-alpha.9
- v5.0.0-alpha.8
- v5.0.0-alpha.7
- v5.0.0-alpha.6
- v5.0.0-alpha.5
- v5.0.0-alpha.4
- v5.0.0-alpha3
- v5.0.0-alpha.2
- v5.0.0-alpha.1
- v4.6.13
- v4.6.12
- v4.6.11
- v4.6.10
- 4.6.9
- v4.6.8
- v4.6.7
- v4.6.6
- v4.6.5
- v4.6.4
- v4.6.3
- v4.6.2
- v4.6.1
- v4.6.0
- v4.5.1
- v4.5.0
- v4.4.1
- v4.4.0
- v4.3.1
- v4.3.0
- v4.2.8
- v4.2.7
- v4.2.6
- v4.2.5
- v4.2.4
- v4.2.3
- v4.2.2
- v4.2.1
- v4.2.0
- v4.1.12
- v4.1.11
- v4.1.10
- v4.1.9
- v4.1.8
- v4.1.7
- v4.1.6
- v4.1.5
- v4.1.4
- v4.1.3
- v4.1.2
- v4.1.1
- v4.1.0
- v4.0.3
- v4.0.2
- v4.0.1
- v4.0.0
- v3.4.5
- v3.4.4
- v3.4.3
- v3.4.2
- v3.4.1
- v3.4.0
- v3.3.11
- v3.3.10
- v3.3.9
- v3.3.8
- v3.3.7
- v3.3.6
- v3.3.5
- v3.3.4
- v3.3.3
- v3.3.2
- v3.3.1
- v3.3.0
- v3.2.6
- v3.2.5
- v3.2.4
- v3.2.3
- v3.2.2
- v3.2.1
- v3.2
- v3.1.6
- v3.1.5
- v3.1.4
- v3.1.3
- v3.1.2
- v3.1.1
- v3.1.0
- v3.0.3
- v3.0.2
- v3.0.1
- v3.0.0
- v2.3.9
- v2.3.8
- v2.3.7
- v2.3.6
- v2.3.5
- v2.3.4
- v2.3.3
- v2.3.2
- v2.3.1
- v2.3
- v2.2
- v2.1
- v2.0.1
- v2.0.0
- v1.10.6
- v1.10.5
- v1.10.4
- v1.10.3
- v1.10.2
- v1.10.1
- v1.10
- v1.9.2
- v1.9.1
- v1.9
- v1.8.2
- v1.8.1
- v1.8
- v1.7.2
- v1.7.1
- v1.7.0
- v1.6.1
- v1.6.0
- v1.5.4
- v1.5.3
- v1.5.2
- v1.5.1
- v1.5.0
- v1.4.0
- v1.3.2
- v1.3.1
- v1.3.0
- v1.2.0
- v1.1.0
- v1.0.0
- v0.8.1
- v0.8.0
- v0.7.1
- v0.7.0
- v0.6.4
- v0.6.3
- v0.6.2
- v0.6.1
- v0.6.0
- v0.5.0
- v0.4.2
- v0.4.1
- v0.4.0
- v0.3.0
- v0.1.0
- v0.1.0-alpha
- dev-release-4.x
- dev-dependabot/composer/production-dependencies-25162ddcf4
- dev-release-5.x
- dev-feature/saml2-entities-2
- dev-feature/saml2-entities
- dev-feature/conformance
- dev-optimization-for-b64-decoder
- dev-bugfix/prevent-decryption-of-unencrypted-assertions
- dev-rewrite-api
- dev-encrypted_elements
- dev-release-2.x
- dev-release-1.x
- dev-release-1.8.x
- dev-release-1.9.x
- dev-master / 6.0.x-dev
This package is auto-updated.
Last update: 2024-11-20 21:04:08 UTC
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\AbstractContainer
then 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'); // Instantiate XML Random utils $randomUtils = new \SimpleSAML\XML\Utils\Random(); // Set up an AuthnRequest $request = new \SimpleSAML\SAML2\XML\samlp\AuthnRequest( $issuer, $randomUtils->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.