PHPackages                             exeba/simplesamlphp-module-oauth2 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. exeba/simplesamlphp-module-oauth2

ActiveSimplesamlphp-module[Authentication &amp; Authorization](/categories/authentication)

exeba/simplesamlphp-module-oauth2
=================================

A SimpleSAMLphp module adding support for the OAuth2 protocol.

4.0.2(1y ago)1581MITPHPPHP &gt;=7.1

Since Apr 29Pushed 1y ago1 watchersCompare

[ Source](https://github.com/exeba/simplesamlphp-module-oauth2)[ Packagist](https://packagist.org/packages/exeba/simplesamlphp-module-oauth2)[ RSS](/packages/exeba-simplesamlphp-module-oauth2/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (11)Versions (30)Used By (0)

SimpleSAMLphp OAuth2 module
===========================

[](#simplesamlphp-oauth2-module)

Installation
------------

[](#installation)

This package add support for the OAuth2 protocol through a SimpleSAMLphp module installable through [Composer](https://getcomposer.org/). Installation can be as easy as executing:

```
composer.phar require exeba/simplesamlphp-module-oauth2 ~3.0

```

Configuration
-------------

[](#configuration)

### Configure the module

[](#configure-the-module)

Copy the template file to the config directory:

```
cp modules/oauth2/config-template/module_oauth2.php config/

```

and edit it. The options are self explained.

### Create or the schema

[](#create-or-the-schema)

The schema is maintaned using doctrine command line tool located at

```
path/to/simplesaml/modules/oauth2/bin/doctrine

```

Create oauth2 clients
---------------------

[](#create-oauth2-clients)

To add and remove Oauth2 clients, you need to logon on simplesaml with an admin account. Open the *Federation* tab and you will see the *OAuth2 Client Registry* option.

You can specify as many redirect address as you want.

Using the module
----------------

[](#using-the-module)

This module is based on [Oauth2 Server from the PHP League](https://oauth2.thephpleague.com/)and supports the following grants:

- Authorization code grant
- Client credentials grant
- Refresh grant

### Create the oauth2 keys:

[](#create-the-oauth2-keys)

The oauth2 library used generates Json Web Tokens to create the Access Tokens, so you need to create a public and private cert keys:

To generate the private key run this command on the terminal:

```
openssl genrsa -out cert/oauth2_module.pem 1024

```

If you want to provide a passphrase for your private key run this command instead:

```
openssl genrsa -passout pass:_passphrase_ -out cert/oauth2_module.pem 1024

```

then extract the public key from the private key:

```
openssl rsa -in cert/oauth2_module.pem -pubout -out cert/oauth2_module.crt

```

or use your passphrase if provided on private key generation:

```
openssl rsa -in cert/oauth2_module.pem -passin pass:_passphrase_ -pubout -out cert/oauth2_module.crt

```

If you use a passphrase remember to configure it in the *module\_oauth2.php* config file.

### Endpoints

[](#endpoints)

- Authorization Endpoint: {{baseurlpath}}/module.php/oauth2/authorize
- Token Endpoint: {{baseurlpath}}/module.php/oauth2/access\_token
- Token Introspection Endpoint: {{baseurlpath}}/module.php/oauth2/userinfo

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance49

Moderate activity, may be stable

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 96.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~148 days

Recently: every ~359 days

Total

26

Last Release

374d ago

Major Versions

1.1.1 → 2.0.42017-07-12

1.2.0 → 2.2.02017-09-15

1.2.1 → 2.2.12018-01-18

1.0.x-dev → 3.0.02021-03-02

3.0.4 → 4.0.02023-07-08

PHP version history (3 changes)2.0.0-rc1PHP &gt;=5.5.9

3.0.0PHP &gt;=7.0

4.0.0PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/0a6f88687ec4cba9767405892fa202899a9d1a63afe6ebddd1f50003ce58cdcc?d=identicon)[exeba](/maintainers/exeba)

---

Top Contributors

[![sgomez](https://avatars.githubusercontent.com/u/580701?v=4)](https://github.com/sgomez "sgomez (29 commits)")[![exeba](https://avatars.githubusercontent.com/u/2987336?v=4)](https://github.com/exeba "exeba (1 commits)")

---

Tags

oauth2

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/exeba-simplesamlphp-module-oauth2/health.svg)

```
[![Health](https://phpackages.com/badges/exeba-simplesamlphp-module-oauth2/health.svg)](https://phpackages.com/packages/exeba-simplesamlphp-module-oauth2)
```

###  Alternatives

[simplesamlphp/simplesamlphp-module-oidc

A SimpleSAMLphp module adding support for the OpenID Connect protocol

5018.2k1](/packages/simplesamlphp-simplesamlphp-module-oidc)[laravel/octane

Supercharge your Laravel application's performance.

4.0k26.6M223](/packages/laravel-octane)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.1k17.8k](/packages/prestashop-prestashop)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[concrete5/core

Concrete core subtree split

20166.1k52](/packages/concrete5-core)[trikoder/oauth2-bundle

Symfony bundle which provides OAuth 2.0 authorization/resource server capabilities.

2521.8M](/packages/trikoder-oauth2-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
