• Stars
    star
    283
  • Rank 145,617 (Top 3 %)
  • Language
    PHP
  • License
    GNU Lesser Genera...
  • Created almost 11 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

SimpleSAMLphp low-level SAML2 PHP library

SimpleSAMLphp SAML2 library

CI Scrutinizer Code Quality Coverage Status Type coverage Psalm Level

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.

More Repositories

1

simplesamlphp

SimpleSAMLphp is an application written in native PHP that deals with authentication.
PHP
1,063
star
2

SAML-tracer

Browser extension for examining SAML messages
JavaScript
141
star
3

simplesamlphp-module-oidc

A SimpleSAMLphp module for OIDC OP support.
PHP
45
star
4

docker-simplesamlphp

A docker image for easy deployment of SimpleSAMLphp as either an Identity Provider or as a Service Provider.
PHP
21
star
5

simplesamlphp-module-webauthn

A module implementing FIDO2 / WebAuthn as a second authentication factor
PHP
15
star
6

composer-module-installer

A Composer plugin that allows installing SimpleSAMLphp modules through Composer.
PHP
13
star
7

simplesamlphp-module-metarefresh

The metarefresh module will download and parse metadata documents and store them locally
PHP
7
star
8

simplesamlphp-module-openidprovider

A SimpleSAMLphp module adding support for the OpenID protocol as an Identity Provider.
PHP
7
star
9

simplesamlphp-module-casserver

CAS 1.0 and 2.0 compliant CAS server module for simpleSAMLphp
PHP
6
star
10

simplesamlphp-module-consentsimpleadmin

A SimpleSAMLphp module implementing a very simple user interface for managing consent.
PHP
6
star
11

simplesamlphp-module-authcrypt

This module provides authentication based on password hashes and htpasswd-files
PHP
5
star
12

simplesamlphp-module-discopower

Fancy tabbed discovery service with filtering capabilities where SPs can have different sets of metadata listed
PHP
5
star
13

simplesamlphp-module-authX509

Authentication module for X509 client certificates
PHP
5
star
14

simplesamlphp-module-adfs

This module adds support for WS-Federation
PHP
5
star
15

simplesamlphp-module-yubikey

PHP
5
star
16

simplesamlphp-module-openid

A SimpleSAMLphp module adding support for the OpenID protocol.
PHP
5
star
17

simplesamlphp-module-memcookie

A SimpleSAMLphp module that supports Auth MemCookie authentication for applications not written in PHP.
PHP
5
star
18

simplesamlphp-module-authorize

This module provides a user authorization filter based on attribute matching
PHP
5
star
19

simplesamlphp-module-expirycheck

The expirycheck module validates user's expiry date
PHP
5
star
20

simplesamlphp-module-entitycategories

A SimpleSAMLphp module to create attribute release policies based on entity categories.
PHP
5
star
21

simplesamlphp-module-exampleattributeserver

An example for SAML attributes queries
PHP
5
star
22

simplesamlphp-module-ldap

Module that provides authentication against LDAP stores
PHP
4
star
23

simplesamlphp-module-authyubikey

simplesamlphp-module-authyubiKey
PHP
4
star
24

simplesamlphp-module-consentadmin

PHP
4
star
25

simplesamlphp-module-cdc

Common domain cookies
PHP
4
star
26

simplesamlphp-module-cas

PHP
4
star
27

simplesamlphp-module-authtwitter

Authentication module to authenticate against Twitter
PHP
4
star
28

simplesamlphp-module-negotiate

Negotiate module
PHP
4
star
29

simplesamlphp-module-consent

Consent module
PHP
4
star
30

assert

A wrapper around webmozart/assert to make it useful beyond checking method arguments
PHP
4
star
31

simplesamlphp-module-aggregator2

A SimpleSAMLphp module for metadata aggregation.
PHP
4
star
32

simplesamlphp-module-sqlauth

This is a authentication module for authenticating a user against a SQL database
PHP
4
star
33

simplesamlphp-module-saml2debug

A module to debug encoding and decoding of SAML message for both the HTTP-redirect and HTTP-POST bindings.
PHP
4
star
34

simplesamlphp-module-authfacebook

Authentication module to authenticate against Facebook
PHP
3
star
35

simplesamlphp-module-metaedit

A SimpleSAMLphp module for metadata editing and registration.
PHP
3
star
36

simplesamlphp-module-sanitycheck

Perform sanity checks on configuration
PHP
3
star
37

simplesamlphp-module-authwindowslive

Authentication module to authenticate against Windows Live
PHP
3
star
38

simplesamlphp-module-memcachemonitor

Module that can display usage stats of memcache(d) backends
PHP
3
star
39

simplesamlphp-module-smartattributes

The SmartAttributes module provides additional authentication processing filters to manipulate attributes
PHP
3
star
40

simplesamlphp.github.io

SimpleSAMLphp website
CSS
2
star
41

xml-security

SimpleSAMLphp library for XML Security
PHP
2
star
42

simplesamlphp-module-riak

This module implements the Riak session store
PHP
2
star
43

xml-common

Common classes for handling XML-structures
PHP
2
star
44

simplesamlphp-module-oauth

Oauth1 module for SimpleSAMLphp
PHP
2
star
45

simplesamlphp-module-autotest

This module provides an interface to do automatic testing of authentication sources.
PHP
2
star
46

simplesamlphp-module-discojuice

DiscoJuice is a very flexible User Interface library for implementing an IdP Discovery Service.
PHP
2
star
47

simplesamlphp-module-radius

Authenticate a user against a RADIUS server
PHP
2
star
48

simplesamlphp-module-preprodwarning

PHP
2
star
49

simplesamlphp-module-statistics

The SimpleSAMLphp statistics module
PHP
2
star
50

simplesamlphp-module-aggregator

This is a module for SimpleSAMLphp that aggregates a set of SAML entities into SAML 2.0 metadata documents.
PHP
1
star
51

simplesamlphp-module-logpeek

A SimpleSAMLphp module to provide a web API to access the log files.
PHP
1
star
52

simplesamlphp-module-infocard

A SimpleSAMLphp module that works with Information Cards techcnologies.
PHP
1
star
53

simplesamlphp-module-modinfo

A very straightforward module for SimpleSAMLphp that displays the list of modules and their status in the web interface.
PHP
1
star
54

simplesamlphp-module-subjectidattrs

Module implementing SAML V2.0 Subject Identifier Attributes Profile
PHP
1
star
55

dictionaryconverter

Tool to convert and merge ssp json dictionaries to gettext .po-files
Python
1
star
56

saml2-module-spid

Add support for the Italian SPID specifications
PHP
1
star
57

simplesamlphp-module-negotiateext

Adds support for Kerberos SPNEGO or other GSSAPI by leveraging Apache modules
PHP
1
star