PHPackages                             itk-dev/itkdev\_openid\_connect\_drupal - 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. itk-dev/itkdev\_openid\_connect\_drupal

AbandonedArchivedDrupal-module

itk-dev/itkdev\_openid\_connect\_drupal
=======================================

OpenID Connect module

091PHP

Since Jun 23Pushed 4y ago2 watchersCompare

[ Source](https://github.com/itk-dev/itkdev_openid_connect_drupal)[ Packagist](https://packagist.org/packages/itk-dev/itkdev_openid_connect_drupal)[ RSS](/packages/itk-dev-itkdev-openid-connect-drupal/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

OpenID Connect
==============

[](#openid-connect)

A simple OpenID Connect module for Drupal.

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

[](#installation)

```
composer require itk-dev/itkdev_openid_connect_drupal
vendor/bin/drush pm:enable itkdev_openid_connect_drupal
```

### Configuration

[](#configuration)

```
$config['itkdev_openid_connect_drupal']['authenticators']['generic'] = [
  // Optional name.
  'name' => 'Azure B2C',
  // Optional. Default: FALSE
  'show_on_login_form' => TRUE,

  // Optional. Redirect after login (default: )
  'default_location' => '/content',

  // Optional. Default: FALSE
  'debug => TRUE,

  // Required OpenID Connect Discovery url (cf. https://swagger.io/docs/specification/authentication/openid-connect-discovery/)
  'openid_connect_discovery_url' => …,
  // Required client id.
  'client_id' => …,
  // Required client secret.
  'client_secret' => …,

  // Required map from user field to claim name.
  'fields' => [
    // Mapping `name` is required.
    'name' => 'upn',
    // Mapping `mail` is required.
    'mail' => 'email',

    // Additional user fields.
    'field_first_name' => 'given_name',
    'field_last_name' => 'family_name',

    // Mapping `roles` is optional, but recommended.
    'roles' => 'role',
  ],

  'roles => [
    // Optional map from OpenID role name to list of Drupal role (machine) names (or a single name).
    'map' => [
      'admin' => ['administrator', 'user_manager'],
      'user' => 'authenticated',
    ],

    // Optional default Drupal role (machine) names that users will always get.
    'default => [
      'employee',
    ],
  ],
];

$config['itkdev_openid_connect_drupal']['authenticators']['userid'] = [
  'openid_connect_discovery_url' => …,
  'client_id' => …,
  'client_secret' => …,
  …,
  'default_roles' => [
    'user',
  ],
];
```

Usage
-----

[](#usage)

To authenticate using one of the defined authenticators, the user must be sent to `/itkdev_openid_connect_drupal/authenticate/«key»`, where `«key»` is one of the authenticators defined in config (i.e. `generic` or `userid` in the example above).

Generate the authentication url with code like

```
Url::fromRoute('itkdev_openid_connect_drupal.openid_connect, ['key' => $key])
```

Development
-----------

[](#development)

### Coding standards

[](#coding-standards)

```
composer install
composer coding-standards-check
composer coding-standards-apply
```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/33924554?v=4)[ITK Development](/maintainers/itk-dev)[@itk-dev](https://github.com/itk-dev)

---

Top Contributors

[![rimi-itk](https://avatars.githubusercontent.com/u/11267554?v=4)](https://github.com/rimi-itk "rimi-itk (34 commits)")

### Embed Badge

![Health badge](/badges/itk-dev-itkdev-openid-connect-drupal/health.svg)

```
[![Health](https://phpackages.com/badges/itk-dev-itkdev-openid-connect-drupal/health.svg)](https://phpackages.com/packages/itk-dev-itkdev-openid-connect-drupal)
```

PHPackages © 2026

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