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

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

itk-dev/os2forms\_nemlogin\_openid\_connect
===========================================

os2forms\_nemlogin\_openid\_connect

2.4.1(2mo ago)06.1k1[2 PRs](https://github.com/itk-dev/os2forms_nemlogin_openid_connect/pulls)MITPHP

Since Jun 29Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/itk-dev/os2forms_nemlogin_openid_connect)[ Packagist](https://packagist.org/packages/itk-dev/os2forms_nemlogin_openid_connect)[ Docs](https://www.drupal.org/project/os2forms_nemlogin_openid_connect)[ RSS](/packages/itk-dev-os2forms-nemlogin-openid-connect/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (10)Dependencies (26)Versions (20)Used By (0)

OS2Forms NemLogin OpenID Connect
================================

[](#os2forms-nemlogin-openid-connect)

Implements an [OS2Web NemLog-in `AuthProvider`](https://github.com/OS2web/os2web_nemlogin/blob/master/src/Annotation/AuthProvider.php), [`OpenIDConnect`](src/Plugin/os2web/NemloginAuthProvider/OpenIDConnect.php), for authenticating with [OpenID Connect](https://openid.net/connect/). But allows for multiple of these to be defined eg. AD and NemLogin.

A controller, [`OpenIDConnectController`](src/Controller/OpenIDConnectController.php), takes care of the actual authenticating.

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

[](#installation)

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

The module has a soft dependency on `os2forms_organisation` in the sense that the `OrganisationEventSubscriber` only will be initialized if the `os2forms_organisation` module is installed. See the comments in `OrganisationEventSubscriber::getSubscribedEvents`.

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

[](#configuration)

Go to `/admin/os2forms_nemlogin_openid_connect/settings` to set up providers, eg.

```
openid_connect_nemlogin: OpenIDConnect Nemlogin
openid_connect_ad: OpenIDConnect AD
```

and then go to `/admin/config/system/os2web-nemlogin/«id»` to set up the OpenID Connect configuration.

You should then see the provider having status `OK` on `/admin/config/system/os2web-nemlogin`.

Use on a webform
----------------

[](#use-on-a-webform)

Edit a webform, go to Settings &gt; Third Party Settings &gt; OS2Forms &gt; OS2Forms NemID settings and specify “Webform type”:

[![Webform type](docs/assets/Webform-type.png)](docs/assets/Webform-type.png)

Authentication settings
-----------------------

[](#authentication-settings)

When “Webform type” is specified it’s possible to add an authentication check on the form by requiring the value of a field (pre-filled with a value from a previous submission) to match the value of a specified user property.

Before using authentication checks, “User claims” available for the checks must be defined on `/admin/config/system/os2web-nemlogin/«id»`.

Edit a webform, go to Settings &gt; Third Party Settings &gt; OS2Forms &gt; OS2Forms NemID settings &gt; Authentication settings and define which “User claim” value must match a “Form element” value:

[![Authentication settings](docs/assets/authentication-settings.png)](docs/assets/authentication-settings.png)

Note: The authentication check sits on top of the other access checks in OS2Forms, i.e. it does not itself grant access, but adds additional requirements that must be fulfilled before a user can fill in a form.

Local test
----------

[](#local-test)

Authenticating with local test users can be enabled in `settings.local.php`:

```
// Enable local test mode
$settings['os2forms_nemlogin_openid_connect']['local_test_mode'] = TRUE;

// Define local test users
//   User id => user info (claims)
$settings['os2forms_nemlogin_openid_connect']['local_test_users'] = [
  '1234567890' => [
    'cpr' => '1234567890',
    'name' => 'John Doe',
  ],
  'another-user' => [
    …
  ],
];

// Override settings for specific plugins:
$settings['os2forms_nemlogin_openid_connect']['my-plugin-id']['local_test_mode'] = FALSE;

// Define local test users
//   User id => user info (claims)
$settings['os2forms_nemlogin_openid_connect']['another-plugin-id']['local_test_users'] = [
  'user087' => [
    'id' => 'user087',
    'name' => 'User 87',
  ],
];
```

Coding standards
----------------

[](#coding-standards)

Our coding are checked by GitHub Actions (cf. [.github/workflows/pr.yml](.github/workflows/pr.yml)). Use the commands below to run the checks locally.

### PHP

[](#php)

```
docker run --rm --volume ${PWD}:/app --workdir /app itkdev/php8.3-fpm composer install
# Fix (some) coding standards issues
docker run --rm --volume ${PWD}:/app --workdir /app itkdev/php8.3-fpm composer coding-standards-apply
# Check that code adheres to the coding standards
docker run --rm --volume ${PWD}:/app --workdir /app itkdev/php8.3-fpm composer coding-standards-check
```

### Markdown

[](#markdown)

```
docker run --rm --volume $PWD:/md peterdavehello/markdownlint markdownlint --ignore vendor --ignore LICENSE.md '**/*.md' --fix
docker run --rm --volume $PWD:/md peterdavehello/markdownlint markdownlint --ignore vendor --ignore LICENSE.md '**/*.md'
```

Code analysis
-------------

[](#code-analysis)

We use [PHPStan](https://phpstan.org/) for static code analysis.

Running statis code analysis on a standalone Drupal module is a bit tricky, so we use a helper script to run the analysis:

```
docker run --rm --volume ${PWD}:/app --workdir /app itkdev/php8.3-fpm ./scripts/code-analysis
```

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance86

Actively maintained with recent releases

Popularity24

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 64.2% 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 ~107 days

Recently: every ~101 days

Total

14

Last Release

72d ago

Major Versions

1.3.0 → 2.0.02023-08-03

### 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 (86 commits)")[![jekuaitk](https://avatars.githubusercontent.com/u/78410897?v=4)](https://github.com/jekuaitk "jekuaitk (46 commits)")[![stankut](https://avatars.githubusercontent.com/u/1537807?v=4)](https://github.com/stankut "stankut (2 commits)")

### Embed Badge

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

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

###  Alternatives

[symfony/form

Allows to easily create, process and reuse HTML forms

2.8k162.1M3.5k](/packages/symfony-form)[symfony/rate-limiter

Provides a Token Bucket implementation to rate limit input and output in your application

27054.3M290](/packages/symfony-rate-limiter)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[nucleos/user-bundle

Lightweight user management for symfony

62404.7k7](/packages/nucleos-user-bundle)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k14](/packages/2lenet-crudit-bundle)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9421.6k61](/packages/open-dxp-opendxp)

PHPackages © 2026

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