2017 © Pedro Peláez
 

library saml2

SAML2 PHP library from SimpleSAMLphp

image

ym-careers/saml2

SAML2 PHP library from SimpleSAMLphp

  • Wednesday, May 9, 2018
  • by dev.careers@yourmembership.com
  • Repository
  • 0 Watchers
  • 0 Stars
  • 226 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 414 % Grown

The README.md

SimpleSAMLphp SAML2 library

Build Status Coverage Status, (*1)

A PHP library for SAML2 related functionality. Extracted from SimpleSAMLphp, used by OpenConext. This library started as a collaboration between UNINETT and SURFnet but everyone is invited to contribute., (*2)

Before you use it

DO NOT USE THIS LIBRARY UNLESS YOU ARE INTIMATELY FAMILIAR WITH THE SAML2 SPECIFICATION., (*3)

If you are not familiar with the SAML2 specification and are simply looking to connect your application using SAML2, you should probably use SimpleSAMLphp., (*4)

Note that the HTTP Artifact Binding and SOAP client do not work outside of SimpleSAMLphp., (*5)

Which version to pick?

The latest released version (3.x range) is the only supported version., (*6)

All other branches (2.x and earlier) are no longer supported and will not receive any maintenance or (security) fixes. Do not use these versions., (*7)

Usage

  • Install with Composer, run the following command in your project:
composer require simplesamlphp/saml2:^3.0
  • Provide the required external dependencies by extending and implementing the SAML2\Compat\AbstractContainer then injecting it in the ContainerSingleton (see example below)., (*8)

  • Make sure you've read the security section below., (*9)

  • Use at will. Example:, (*10)

    // Use Composers autoloading
    require 'vendor/autoload.php';

    // Implement the Container interface (out of scope for example)
    require 'container.php';
    SAML2\Compat\ContainerSingleton::setContainer($container);

    // Set up an AuthnRequest
    $request = new SAML2\AuthnRequest();
    $request->setId($container->generateId());
    $request->setIssuer('https://sp.example.edu');
    $request->setDestination('https://idp.example.edu');

    // Send it off using the HTTP-Redirect binding
    $binding = new SAML2\HTTPRedirect();
    $binding->send($request);

Security

  • Should you need to create a DOMDocument instance, use the SAML2\DOMDocumentFactory to create DOMDocuments from either a string (SAML2\DOMDocumentFactory::fromString($theXmlAsString)), a file (SAML2\DOMDocumentFactory::fromFile($pathToTheFile)) or just a new instance (SAML2\DOMDocumentFactory::create()). This in order to protect yourself against the XXE Processing Vulnerability, as well as XML Entity Expansion attacks

License

This library is licensed under the LGPL license version 2.1. For more details see LICENSE., (*11)

The Versions

09/05 2018

dev-master

9999999-dev

SAML2 PHP library from SimpleSAMLphp

  Sources   Download

LGPL-2.1

The Requires

 

The Development Requires

by Shruti Nafday
by Zhenbo Shi

09/05 2018

v1.0.0

1.0.0.0

SAML2 PHP library from SimpleSAMLphp

  Sources   Download

LGPL-2.1

The Requires

 

The Development Requires

by Shruti Nafday
by Zhenbo Shi