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(10mo ago)1579MITPHPPHP &gt;=7.1

Since Apr 29Pushed 10mo 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 1w 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

40

—

FairBetter than 88% of packages

Maintenance53

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

328d 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

[league/oauth2-server

A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.

6.6k136.0M248](/packages/league-oauth2-server)[simplesamlphp/simplesamlphp-module-oidc

A SimpleSAMLphp module adding support for the OpenID Connect protocol

5016.9k1](/packages/simplesamlphp-simplesamlphp-module-oidc)[league/oauth2-server-bundle

Symfony bundle .

2344.7M6](/packages/league-oauth2-server-bundle)[jeremy379/laravel-openid-connect

OpenID Connect support to the PHP League's OAuth2 Server. Compatible with Laravel Passport.

55342.3k2](/packages/jeremy379-laravel-openid-connect)[ronvanderheijden/openid-connect

OpenID Connect support to the PHP League's OAuth2 Server. Compatible with Laravel Passport.

61755.5k](/packages/ronvanderheijden-openid-connect)[facile-it/php-openid-client

OpenID (OIDC) Client

42592.7k7](/packages/facile-it-php-openid-client)

PHPackages © 2026

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