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.3.1(4mo ago)04.4k1[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 1mo ago

READMEChangelog (10)Dependencies (13)Versions (16)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

44

—

FairBetter than 92% of packages

Maintenance80

Actively maintained with recent releases

Popularity21

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.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 ~114 days

Total

12

Last Release

149d 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 (42 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

[friendsofsymfony/user-bundle

Symfony FOSUserBundle

3.2k35.4M311](/packages/friendsofsymfony-user-bundle)[hwi/oauth-bundle

Support for authenticating users using both OAuth1.0a and OAuth2 in Symfony.

2.4k21.5M68](/packages/hwi-oauth-bundle)[sonata-project/user-bundle

Symfony SonataUserBundle

3465.6M44](/packages/sonata-project-user-bundle)[nucleos/user-bundle

Lightweight user management for symfony

61380.7k5](/packages/nucleos-user-bundle)[ezsystems/ezplatform-user

eZ Platform User bundle

24709.4k16](/packages/ezsystems-ezplatform-user)[nucleos/profile-bundle

Registration and profile management for symfony

12218.5k1](/packages/nucleos-profile-bundle)

PHPackages © 2026

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