PHPackages                             openeuropa/oe\_auth - 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. openeuropa/oe\_auth

Abandoned → [openeuropa/oe\_authentication](/?search=openeuropa%2Foe_authentication)Drupal-module[Authentication &amp; Authorization](/categories/authentication)

openeuropa/oe\_auth
===================

Authentication against the OpenEuropa Authentication service.

1.21.1(2mo ago)1741513[12 issues](https://github.com/openeuropa/oe_authentication/issues)[7 PRs](https://github.com/openeuropa/oe_authentication/pulls)EUPL-1.2PHPPHP &gt;=8.3CI passing

Since Jun 19Pushed 2mo ago26 watchersCompare

[ Source](https://github.com/openeuropa/oe_authentication)[ Packagist](https://packagist.org/packages/openeuropa/oe_auth)[ RSS](/packages/openeuropa-oe-auth/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (10)Dependencies (28)Versions (67)Used By (0)

OpenEuropa Authentication
=========================

[](#openeuropa-authentication)

[![Build Status](https://camo.githubusercontent.com/319f7c46919b5367b754da4b9ce2f13a6e08db8d6a8ba5ded657ed7b1ce233ed/68747470733a2f2f64726f6e652e66706669732e65752f6170692f6261646765732f6f70656e6575726f70612f6f655f61757468656e7469636174696f6e2f7374617475732e7376673f6272616e63683d6d6173746572)](https://drone.fpfis.eu/openeuropa/oe_authentication)[![Packagist](https://camo.githubusercontent.com/65498c290e1f6809921283dc51d4e8e8f4203557e696cd108b5ff5587e6c8a19/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f70656e6575726f70612f6f655f61757468656e7469636174696f6e2e737667)](https://packagist.org/packages/openeuropa/oe_authentication)

The OpenEuropa Authentication module allows authentication against EU Login, the European Commission login service.

**Table of contents:**

- [Requirements](#requirements)
- [Installation](#installation)
- [Configuration](#configuration)
- [Development](#development)
    - [Project setup](#project-setup)
    - [Using Docker Compose](#using-docker-compose)
- [Troubleshooting](#troubleshooting)
- [Contributing](#contribution)
- [Versioning](#versioning)

Requirements
------------

[](#requirements)

This module requires the following modules:

- [Cas](https://www.drupal.org/project/cas)

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

[](#installation)

The recommended way of installing the OpenEuropa Authentication module is via [Composer](https://www.drupal.org/docs/develop/using-composer/using-composer-to-manage-drupal-site-dependencies#managing-contributed).

```
composer require openeuropa/oe_authentication
```

### Enable the module

[](#enable-the-module)

In order to enable the module in your project run:

```
./vendor/bin/drush en oe_authentication
```

EU Login service parameters are already set by default when installing the module. Please refer to the EU Login documentation for the available options that can be specified. You can see Project setup section on how to override these parameters.

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

[](#configuration)

EU Login service parameters are already set by default when installing the module. Please refer to the EU Login documentation for the available options that can be specified. You can see Project setup section on how to override these parameters.

### Settings overrides

[](#settings-overrides)

In the Drupal `settings.php` you can override CAS parameters such as the ones below, corresponding to the `cas.settings` and `oe_authentication.settings` configuration objects.

```
$config['cas.settings']['server']['hostname'] = 'authentication';
$config['cas.settings']['server']['port'] = '7002';
$config['cas.settings']['server']['path'] = '/cas';
$config['oe_authentication.settings']['register_path'] = 'register';
$config['oe_authentication.settings']['validation_path'] = 'TicketValidationService';
```

By default, the development setup is configured via Task Runner to use the demo CAS server provided in the `docker-compose.yml.dist`, i.e. `https://authentication:7002`.

If you want to test the module with the actual EU Login service, comment out all the lines above in your `settings.php`and clear the cache.

### Account Handling &amp; Auto Registration

[](#account-handling--auto-registration)

The module enables the option that if a user attempts to login with an account that is not already registered, the account will automatically be created.

See the [Cas module](https://www.drupal.org/project/cas) for more information.

### Forced Login

[](#forced-login)

The module enables the Forced Login feature to force anonymous users to authenticate via CAS when they hit all or some of the pages on your site.

See the [Cas module](https://www.drupal.org/project/cas) for more information.

### Proxy

[](#proxy)

You can configure the module to "Initialize this client as a proxy" which allows authentication requests to 3rd party services (e.g. ePOETRY).

```
$config['cas.settings']['proxy']['initialize'] = TRUE;
```

See the [Cas module](https://www.drupal.org/project/cas) for more information.

### Two-factor authentication

[](#two-factor-authentication)

The module allows to configure if two-factor authentication (in short, 2FA) is required for users to log in. It supports three modes:

- *Never*: 2FA is never required for any registered user account.
- *Always*: 2FA is always required for any registered user account. A 2FA authentication method will be enforced directly on EU Login.
- *Based on conditions*: 2FA is required only for registered user accounts that match one of the configured conditions. See below.

**Two-factor authentication conditions**

The conditions are validated after the user logged in via EU Login, and only if the login was executed without using a 2FA authentication method.
If at least one of the configured conditions evaluate successfully for the user account, the login to the website will be rejected.
A message will be shown to the user to log in again using a suitable method, together with a link that will allow to choose only 2FA authentication methods on EU Login.

The system will allow to configure any condition plugin (`\Drupal\Core\Condition\ConditionInterface`) that requires a user account as context.
The default condition available via Drupal core is the User Role condition (`\Drupal\user\Plugin\Condition\UserRole`). This condition can be configured with the roles that are required to use 2FA authentication methods in order to log in into the website.

### SSL Verification Setting

[](#ssl-verification-setting)

The EU Login Authentication server must be accessed over HTTPS and the drupal site will verify the SSL/TLS certificate of the server to be sure it is authentic.

For development, you can configure the module to disable this verification:

```
$config['cas.settings']['server']['verify'] = '2';
```

*NOTE: DO NOT USE IN PRODUCTION!*

See the [Cas module](https://www.drupal.org/project/cas) for more information.

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

[](#development)

The OpenEuropa Authentication project contains all the necessary code and tools for an effective development process, such as:

- All PHP development dependencies (Drupal core included) are required by [composer.json](composer.json)
- Project setup and installation can be easily handled thanks to the integration with the [Task Runner](https://github.com/openeuropa/task-runner) project.
- All system requirements are containerized using [Docker Composer](https://docs.docker.com/compose)
- A mock server for testing.

### Project setup

[](#project-setup)

Download all required PHP code by running:

```
composer install
```

This will build a fully functional Drupal test site in the `./build` directory that can be used to develop and showcase the module's functionality.

Before setting up and installing the site make sure to customize default configuration values by copying [runner.yml.dist](runner.yml.dist)to `./runner.yml` and overriding relevant properties.

This command will also:

- This will symlink the module in the proper directory within the test site and perform token substitution in test configuration files such as `behat.yml.dist`.
- Setup Drush and Drupal's settings using values from `./runner.yml.dist`. This includes adding parameters for EULogin
- Setup PHPUnit and Behat configuration files using values from `./runner.yml.dist`

After a successful setup install the site by running:

```
./vendor/bin/run drupal:site-install
```

This will:

- Install the test site
- Enable the OpenEuropa Authentication module

### Using Docker Compose

[](#using-docker-compose)

Alternatively, you can build a development site using [Docker](https://www.docker.com/get-docker) and [Docker Compose](https://docs.docker.com/compose/) with the provided configuration.

Docker provides the necessary services and tools such as a web server and a database server to get the site running, regardless of your local host configuration.

#### Requirements:

[](#requirements-1)

- [Docker](https://www.docker.com/get-docker)
- [Docker Compose](https://docs.docker.com/compose/)

#### Configuration

[](#configuration-1)

By default, Docker Compose reads two files, a `docker-compose.yml` and an optional `docker-compose.override.yml` file. By convention, the `docker-compose.yml` contains your base configuration and it's provided by default. The override file, as its name implies, can contain configuration overrides for existing services or entirely new services. If a service is defined in both files, Docker Compose merges the configurations.

Find more information on Docker Compose extension mechanism on [the official Docker Compose documentation](https://docs.docker.com/compose/extends/).

#### Usage

[](#usage)

To start, run:

```
docker-compose up
```

It's advised to not daemonize `docker-compose` so you can turn it off (`CTRL+C`) quickly when you're done working. However, if you'd like to daemonize it, you have to add the flag `-d`:

```
docker-compose up -d
```

Then:

```
docker-compose exec web composer install
docker-compose exec web ./vendor/bin/run drupal:site-install
```

To be able to interact with the EULogin Mock Service container you need to add the internal container hostname to the hosts file in your *OS*.

```
echo "127.0.1.1       authentication" >> /etc/hosts
```

Using default configuration, the development site files should be available in the `build` directory and the development site should be available at: .

#### Running the tests

[](#running-the-tests)

To run the grumphp checks:

```
docker-compose exec web ./vendor/bin/grumphp run
```

To run the phpunit tests:

```
docker-compose exec web ./vendor/bin/phpunit
```

To run the behat tests:

```
docker-compose exec web ./vendor/bin/behat
```

### Troubleshooting

[](#troubleshooting)

#### Disable Drupal 8 caching

[](#disable-drupal-8-caching)

Manually disabling Drupal 8 caching is a laborious process that is well described [here](https://www.drupal.org/node/2598914).

Alternatively you can use the following Drupal Console commands to disable/enable Drupal 8 caching:

```
./vendor/bin/drupal site:mode dev  # Disable all caches.
./vendor/bin/drupal site:mode prod # Enable all caches.
```

Note: to fully disable Twig caching the following additional manual steps are required:

1. Open `./build/sites/default/services.yml`
2. Set `cache: false` in `twig.config:` property. E.g.:

```
parameters:
  twig.config:
    cache: false
```

3. Rebuild Drupal cache: `./vendor/bin/drush cr`

This is due to the following [Drupal Console issue](https://github.com/hechoendrupal/drupal-console/issues/3854).

### Contributing

[](#contributing)

Please read [the full documentation](https://github.com/openeuropa/openeuropa) for details on our code of conduct, and the process for submitting pull requests to us.

### Versioning

[](#versioning)

We use [SemVer](http://semver.org/) for versioning. For the available versions, see the [tags on this repository](https://github.com/openeuropa/oe_authentication/tags).

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance72

Regular maintenance activity

Popularity24

Limited adoption so far

Community29

Small or concentrated contributor base

Maturity93

Battle-tested with a long release history

 Bus Factor3

3 contributors hold 50%+ of commits

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 ~73 days

Recently: every ~101 days

Total

40

Last Release

71d ago

Major Versions

0.x-dev → 1.0.0-alpha12018-09-19

1.15.0 → 2.x-dev2024-06-26

PHP version history (7 changes)0.1.0PHP ^7.1

1.2.0PHP &gt;=7.2

1.4.0PHP &gt;=7.3

1.6.0PHP &gt;=7.4

1.10.0PHP &gt;=8.0

1.14.0PHP &gt;=8.1

1.21.0PHP &gt;=8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/153362?v=4)[Antonio De Marco](/maintainers/ademarco)[@ademarco](https://github.com/ademarco)

![](https://www.gravatar.com/avatar/d3b1f4079f9a82f6dd88fe6577d1256b4ecbbccbcd4a4ec9bea7c2fd6f72b99a?d=identicon)[DIGIT-CORE](/maintainers/DIGIT-CORE)

---

Top Contributors

[![imanoleguskiza](https://avatars.githubusercontent.com/u/14978592?v=4)](https://github.com/imanoleguskiza "imanoleguskiza (134 commits)")[![brummbar](https://avatars.githubusercontent.com/u/8488617?v=4)](https://github.com/brummbar "brummbar (119 commits)")[![nagyad](https://avatars.githubusercontent.com/u/22004498?v=4)](https://github.com/nagyad "nagyad (74 commits)")[![upchuk](https://avatars.githubusercontent.com/u/5848933?v=4)](https://github.com/upchuk "upchuk (60 commits)")[![voidtek](https://avatars.githubusercontent.com/u/186827?v=4)](https://github.com/voidtek "voidtek (45 commits)")[![sergepavle](https://avatars.githubusercontent.com/u/9432036?v=4)](https://github.com/sergepavle "sergepavle (37 commits)")[![drishu](https://avatars.githubusercontent.com/u/11507647?v=4)](https://github.com/drishu "drishu (29 commits)")[![hernani](https://avatars.githubusercontent.com/u/707860?v=4)](https://github.com/hernani "hernani (21 commits)")[![drupol](https://avatars.githubusercontent.com/u/252042?v=4)](https://github.com/drupol "drupol (18 commits)")[![22Alexandra](https://avatars.githubusercontent.com/u/22908988?v=4)](https://github.com/22Alexandra "22Alexandra (15 commits)")[![ademarco](https://avatars.githubusercontent.com/u/153362?v=4)](https://github.com/ademarco "ademarco (14 commits)")[![sandervd](https://avatars.githubusercontent.com/u/1673560?v=4)](https://github.com/sandervd "sandervd (8 commits)")[![AaronGilMartinez](https://avatars.githubusercontent.com/u/7264392?v=4)](https://github.com/AaronGilMartinez "AaronGilMartinez (8 commits)")[![claudiu-cristea](https://avatars.githubusercontent.com/u/473868?v=4)](https://github.com/claudiu-cristea "claudiu-cristea (7 commits)")[![escuriola](https://avatars.githubusercontent.com/u/6751237?v=4)](https://github.com/escuriola "escuriola (6 commits)")[![yenyasinn](https://avatars.githubusercontent.com/u/1183951?v=4)](https://github.com/yenyasinn "yenyasinn (4 commits)")[![gorsky87](https://avatars.githubusercontent.com/u/21284516?v=4)](https://github.com/gorsky87 "gorsky87 (4 commits)")[![saidatom](https://avatars.githubusercontent.com/u/2377368?v=4)](https://github.com/saidatom "saidatom (4 commits)")[![richardcanoe](https://avatars.githubusercontent.com/u/1321598?v=4)](https://github.com/richardcanoe "richardcanoe (3 commits)")[![netlooker](https://avatars.githubusercontent.com/u/7669736?v=4)](https://github.com/netlooker "netlooker (2 commits)")

---

Tags

authenticationcasdrupal-8drupal-moduleecaseu-logineuropaeuropean-commissionphp

###  Code Quality

TestsBehat

### Embed Badge

![Health badge](/badges/openeuropa-oe-auth/health.svg)

```
[![Health](https://phpackages.com/badges/openeuropa-oe-auth/health.svg)](https://phpackages.com/packages/openeuropa-oe-auth)
```

###  Alternatives

[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6941.5M396](/packages/drupal-core-recommended)[openeuropa/oe_authentication

Authentication against the OpenEuropa Authentication service.

17327.2k5](/packages/openeuropa-oe-authentication)

PHPackages © 2026

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