All Projects → simplesamlphp → Saml2

simplesamlphp / Saml2

Licence: lgpl-2.1
SimpleSAMLphp low-level SAML2 PHP library

Projects that are alternatives of or similar to Saml2

webprofile-ref-project
A example project to demonstrate implementing SAML Web browser SSO profile using OpenSAML V2
Stars: ✭ 23 (-89.96%)
Mutual labels:  saml, saml2
SAML2
No description or website provided.
Stars: ✭ 81 (-64.63%)
Mutual labels:  saml, saml2
Mujina
A mock IDP and SP using the OpenSAML library
Stars: ✭ 250 (+9.17%)
Mutual labels:  saml, saml2
Saml Idp
Simple SAML Identity Provider (IdP) for Node
Stars: ✭ 290 (+26.64%)
Mutual labels:  saml, saml2
Simplesamlphp
SimpleSAMLphp is an award-winning application written in native PHP that deals with authentication.
Stars: ✭ 832 (+263.32%)
Mutual labels:  saml, saml2
Ddf
DDF Distributed Data Framework - an open source, modular integration framework.
Stars: ✭ 112 (-51.09%)
Mutual labels:  saml, saml2
lemonldap-ng
LemonLDAP::NG main code
Stars: ✭ 49 (-78.6%)
Mutual labels:  saml, saml2
Pysaml2
Python implementation of SAML2
Stars: ✭ 371 (+62.01%)
Mutual labels:  saml, saml2
Samlify
🔐 Node.js API for Single Sign On (SAML 2.0)
Stars: ✭ 413 (+80.35%)
Mutual labels:  saml, saml2
Saml2.authentication.core
A SAML 2.0 middleware for ASP.NET Core
Stars: ✭ 66 (-71.18%)
Mutual labels:  saml, saml2
Cipheridaas
CipherIDaaS —— Open-source IDaaS/IAM product by CipherChina , Hangzhou .
Stars: ✭ 121 (-47.16%)
Mutual labels:  saml, saml2
Velocity Engine
Mirror of Apache Velocity Engine
Stars: ✭ 222 (-3.06%)
Mutual labels:  library
Lfortran
Official mirror of https://gitlab.com/lfortran/lfortran. Please submit pull requests (PR) there. Any PR sent here will be closed automatically.
Stars: ✭ 220 (-3.93%)
Mutual labels:  library
Pdf Lib
Create and modify PDF documents in any JavaScript environment
Stars: ✭ 3,426 (+1396.07%)
Mutual labels:  library
C Algorithms
A library of common data structures and algorithms written in C.
Stars: ✭ 2,654 (+1058.95%)
Mutual labels:  library
Slideimageview
Simple and convenient library that allows you to slide images through a view.
Stars: ✭ 227 (-0.87%)
Mutual labels:  library
Libmypaint
libmypaint, a.k.a. "brushlib", is a library for making brushstrokes which is used by MyPaint and other projects.
Stars: ✭ 225 (-1.75%)
Mutual labels:  library
Midir
Cross-platform realtime MIDI processing in Rust.
Stars: ✭ 221 (-3.49%)
Mutual labels:  library
Material Backdrop
A simple solution for implementing Backdrop pattern for Android
Stars: ✭ 221 (-3.49%)
Mutual labels:  library
Vmime
VMime Mail Library
Stars: ✭ 218 (-4.8%)
Mutual labels:  library

SimpleSAMLphp SAML2 library

CI Scrutinizer Code Quality Coverage Status

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 (2.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');

    // Set up an AuthnRequest
    $request = new \SimpleSAML\SAML2\XML\samlp\AuthnRequest(
        $issuer,
        $container->generateId(),
        null,
        'https://idp.example.edu'
    );

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

Security

  • Should you need to create a DOMDocument instance, use the \SimpleSAML\SAML2\DOMDocumentFactory to create DOMDocuments from either a string (\SimpleSAML\SAML2\DOMDocumentFactory::fromString($theXmlAsString)), a file (\SimpleSAML\SAML2\DOMDocumentFactory::fromFile($pathToTheFile)) or just a new instance (\SimpleSAML\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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].