onelogin/php-saml
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
robrichards/xmlseclibs | 3.1.1 | 27.06 kB | BSD-3-Clause | prod |
The "onelogin/php-saml" is a PHP toolkit provided by OneLogin that offers support for SAML (Security Assertion Markup Language), an XML-based standard for web browser single sign-on. This toolkit allows PHP software to effectively operate as a SAML Service Provider (SP), offering compatibility with any SAML Identity Provider (IdP). Key features of the library include support for Single Sign On (SSO) and Single Logout (SLO), Assertion and NameId encryption, Assertion signature, Message signature: AuthNRequest, LogoutRequest, LogoutResponses, and more, while making the entire process easy and efficient for programmers with comprehensive APIs.
To utilize the "onelogin/php-saml" tool in PHP, you first need to install it through composer by executing composer require onelogin/php-saml
in your current PHP project. This toolkit supports PHP 7 & 8. After installation, you can use it by including the autoloader provided by composer found at vendor/autoload.php
. In terms of usage, the library provides various functionalities around SAML protocol such as creating SAML requests, sending them to the identity provider, receiving and processing SAML responses, and many more operations.
Here's a simple example of how to use it for initiating a Single Sign-On (SSO) process:
<?php
require 'vendor/autoload.php'; // Path to the autoload.php file.
$samlSettings = new OneLogin\Saml2\Settings($settingsInfo); // Your SAML settings.
$auth = new OneLogin\Saml2\Auth($samlSettings);
$auth->login(); // This will redirect the user to the IdP for authentication.
?>
Remember to replace $settingsInfo
with your actual SAML settings.
The complete documentation for "onelogin/php-saml" SAML PHP toolkit can be found at https://developers.onelogin.com/page/saml-toolkit-for-php. This resource provides comprehensive information about the library and its capabilities, as well as how to integrate it into PHP applications. It includes a detailed user guide and API reference to help you get started with and maximize the use of the toolkit.