{"id":18594511,"url":"https://github.com/openeuropa/oe_authentication","last_synced_at":"2025-04-06T06:13:55.088Z","repository":{"id":37788743,"uuid":"132572608","full_name":"openeuropa/oe_authentication","owner":"openeuropa","description":"The OpenEuropa Authentication Drupal module allows to authenticate against the European Commission login service EU Login (ECAS)","archived":false,"fork":false,"pushed_at":"2025-03-27T16:32:32.000Z","size":645,"stargazers_count":14,"open_issues_count":32,"forks_count":12,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-03-30T05:09:02.177Z","etag":null,"topics":["authentication","cas","drupal-8","drupal-module","ecas","eu-login","europa","european-commission","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openeuropa.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-08T07:40:51.000Z","updated_at":"2025-03-27T15:29:23.000Z","dependencies_parsed_at":"2024-02-09T22:23:44.082Z","dependency_job_id":"c70e6498-3c23-4b3c-86f5-75a841c98c02","html_url":"https://github.com/openeuropa/oe_authentication","commit_stats":{"total_commits":365,"total_committers":26,"mean_commits":"14.038461538461538","dds":0.7232876712328767,"last_synced_commit":"19f85ce2668dc6d81300ac0ee3f9e1d4974c89a7"},"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openeuropa%2Foe_authentication","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openeuropa%2Foe_authentication/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openeuropa%2Foe_authentication/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openeuropa%2Foe_authentication/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openeuropa","download_url":"https://codeload.github.com/openeuropa/oe_authentication/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247441062,"owners_count":20939239,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","cas","drupal-8","drupal-module","ecas","eu-login","europa","european-commission","php"],"created_at":"2024-11-07T01:15:56.161Z","updated_at":"2025-04-06T06:13:55.038Z","avatar_url":"https://github.com/openeuropa.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenEuropa Authentication\n\n[![Build Status](https://drone.fpfis.eu/api/badges/openeuropa/oe_authentication/status.svg?branch=master)](https://drone.fpfis.eu/openeuropa/oe_authentication)\n[![Packagist](https://img.shields.io/packagist/v/openeuropa/oe_authentication.svg)](https://packagist.org/packages/openeuropa/oe_authentication)\n\nThe OpenEuropa Authentication module allows authentication against EU Login, the European Commission login service.\n\n**Table of contents:**\n\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Configuration](#configuration)\n- [Development](#development)\n  - [Project setup](#project-setup)\n  - [Using Docker Compose](#using-docker-compose)\n- [Troubleshooting](#troubleshooting)\n- [Contributing](#contribution)\n- [Versioning](#versioning)\n\n## Requirements\n\nThis module requires the following modules:\n- [Cas](https://www.drupal.org/project/cas)\n\n## Installation\n\nThe recommended way of installing the OpenEuropa Authentication module is via [Composer][2].\n\n```bash\ncomposer require openeuropa/oe_authentication\n```\n\n### Enable the module\n\nIn order to enable the module in your project run:\n\n```bash\n./vendor/bin/drush en oe_authentication\n```\n\nEU 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\nbe specified. You can see Project setup section on how to override these parameters.\n\n## Configuration\n\nEU Login service parameters are already set by default when installing the module. Please refer to the EU Login\ndocumentation for the available options that can be specified. You can see Project setup section on how to override\nthese parameters.\n\n### Settings overrides\n\nIn the Drupal `settings.php` you can override CAS parameters such as the ones below, corresponding to the\n`cas.settings` and `oe_authentication.settings` configuration objects.\n\n```php\n$config['cas.settings']['server']['hostname'] = 'authentication';\n$config['cas.settings']['server']['port'] = '7002';\n$config['cas.settings']['server']['path'] = '/cas';\n$config['oe_authentication.settings']['register_path'] = 'register';\n$config['oe_authentication.settings']['validation_path'] = 'TicketValidationService';\n```\n\nBy default, the development setup is configured via Task Runner to use the demo CAS server provided in the\n`docker-compose.yml.dist`, i.e. `https://authentication:7002`.\n\nIf you want to test the module with the actual EU Login service, comment out all the lines above in your `settings.php`\nand clear the cache.\n\n### Account Handling \u0026 Auto Registration\n\nThe module enables the option that if a user attempts to login with an account that is not already\nregistered, the account will automatically be created.\n\nSee the [Cas module](https://www.drupal.org/project/cas) for more information.\n\n### Forced Login\n\nThe module enables the Forced Login feature to force anonymous users to\nauthenticate via CAS when they hit all or some of the pages on your site.\n\nSee the [Cas module](https://www.drupal.org/project/cas) for more information.\n\n### SSL Verification Setting\n\nThe EU Login Authentication server must be accessed over HTTPS and the drupal site will verify the SSL/TLS certificate\nof the server to be sure it is authentic.\n\nFor development, you can configure the module to disable this verification:\n```php\n$config['cas.settings']['server']['verify'] = '2';\n```\n_NOTE: DO NOT USE IN PRODUCTION!_\n\nSee the [Cas module](https://www.drupal.org/project/cas) for more information.\n\n### Proxy\n\nYou can configure the module to \"Initialize this client as a proxy\" which allows\nauthentication requests to 3rd party services (e.g. ePOETRY).\n\n```php\n$config['cas.settings']['proxy']['initialize'] = TRUE;\n```\n\nSee the [Cas module](https://www.drupal.org/project/cas) for more information.\n\n## Development\n\nThe OpenEuropa Authentication project contains all the necessary code and tools for an effective development process,\nsuch as:\n\n- All PHP development dependencies (Drupal core included) are required by [composer.json](composer.json)\n- Project setup and installation can be easily handled thanks to the integration with the [Task Runner][3] project.\n- All system requirements are containerized using [Docker Composer][4]\n- A mock server for testing.\n\n### Project setup\n\nDownload all required PHP code by running:\n\n```bash\ncomposer install\n```\n\nThis will build a fully functional Drupal test site in the `./build` directory that can be used to develop and showcase\nthe module's functionality.\n\nBefore setting up and installing the site make sure to customize default configuration values by copying [runner.yml.dist](runner.yml.dist)\nto `./runner.yml` and overriding relevant properties.\n\nThis command will also:\n\n- 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`.\n- Setup Drush and Drupal's settings using values from `./runner.yml.dist`. This includes adding parameters for EULogin\n- Setup PHPUnit and Behat configuration files using values from `./runner.yml.dist`\n\nAfter a successful setup install the site by running:\n\n```bash\n./vendor/bin/run drupal:site-install\n```\n\nThis will:\n\n- Install the test site\n- Enable the OpenEuropa Authentication module\n\n### Using Docker Compose\n\nAlternatively, you can build a development site using [Docker](https://www.docker.com/get-docker) and\n[Docker Compose](https://docs.docker.com/compose/) with the provided configuration.\n\nDocker provides the necessary services and tools such as a web server and a database server to get the site running,\nregardless of your local host configuration.\n\n#### Requirements:\n\n- [Docker](https://www.docker.com/get-docker)\n- [Docker Compose](https://docs.docker.com/compose/)\n\n#### Configuration\n\nBy default, Docker Compose reads two files, a `docker-compose.yml` and an optional `docker-compose.override.yml` file.\nBy convention, the `docker-compose.yml` contains your base configuration and it's provided by default.\nThe override file, as its name implies, can contain configuration overrides for existing services or entirely new\nservices.\nIf a service is defined in both files, Docker Compose merges the configurations.\n\nFind more information on Docker Compose extension mechanism on [the official Docker Compose documentation](https://docs.docker.com/compose/extends/).\n\n#### Usage\n\nTo start, run:\n\n```bash\ndocker-compose up\n```\n\nIt's advised to not daemonize `docker-compose` so you can turn it off (`CTRL+C`) quickly when you're done working.\nHowever, if you'd like to daemonize it, you have to add the flag `-d`:\n\n```bash\ndocker-compose up -d\n```\n\nThen:\n\n```bash\ndocker-compose exec web composer install\ndocker-compose exec web ./vendor/bin/run drupal:site-install\n```\n\nTo 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_.\n\n```bash\necho \"127.0.1.1       authentication\" \u003e\u003e /etc/hosts\n```\n\nUsing default configuration, the development site files should be available in the `build` directory and the development site should be available at: [http://127.0.0.1:8080/build](http://127.0.0.1:8080/build).\n\n#### Running the tests\n\nTo run the grumphp checks:\n\n```bash\ndocker-compose exec web ./vendor/bin/grumphp run\n```\n\nTo run the phpunit tests:\n\n```bash\ndocker-compose exec web ./vendor/bin/phpunit\n```\n\nTo run the behat tests:\n\n```bash\ndocker-compose exec web ./vendor/bin/behat\n```\n\n### Troubleshooting\n\n#### Disable Drupal 8 caching\n\nManually disabling Drupal 8 caching is a laborious process that is well described [here][10].\n\nAlternatively you can use the following Drupal Console commands to disable/enable Drupal 8 caching:\n\n```bash\n./vendor/bin/drupal site:mode dev  # Disable all caches.\n./vendor/bin/drupal site:mode prod # Enable all caches.\n```\n\nNote: to fully disable Twig caching the following additional manual steps are required:\n\n1. Open `./build/sites/default/services.yml`\n2. Set `cache: false` in `twig.config:` property. E.g.:\n\n```yaml\nparameters:\n  twig.config:\n    cache: false\n```\n\n3. Rebuild Drupal cache: `./vendor/bin/drush cr`\n\nThis is due to the following [Drupal Console issue][11].\n\n### Contributing\n\nPlease 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.\n\n### Versioning\n\nWe use [SemVer](http://semver.org/) for versioning. For the available versions, see the [tags on this repository](https://github.com/openeuropa/oe_authentication/tags).\n\n[1]: https://github.com/openeuropa/oe_theme\n[2]: https://www.drupal.org/docs/develop/using-composer/using-composer-to-manage-drupal-site-dependencies#managing-contributed\n[3]: https://github.com/openeuropa/task-runner\n[4]: https://docs.docker.com/compose\n[5]: https://github.com/openeuropa/oe_theme#project-setup\n[6]: https://nodejs.org/en\n[7]: https://www.drupal.org/project/config_devel\n[8]: https://www.docker.com/get-docker\n[9]: https://docs.docker.com/compose\n[10]: https://www.drupal.org/node/2598914\n[11]: https://github.com/hechoendrupal/drupal-console/issues/3854\n[12]: https://www.drupal.org/docs/8/extending-drupal-8/installing-drupal-8-modules\n[13]: https://www.drush.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopeneuropa%2Foe_authentication","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopeneuropa%2Foe_authentication","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopeneuropa%2Foe_authentication/lists"}