Download the PHP package openeuropa/oe_auth without Composer

On this page you can find all versions of the php package openeuropa/oe_auth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package oe_auth

OpenEuropa Authentication

Build Status Packagist

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

Table of contents:

Requirements

This module requires the following modules:

Installation

The recommended way of installing the OpenEuropa Authentication module is via Composer.

Enable the module

In order to enable the module in your project run:

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

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

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.

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 & 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 for more information.

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 for more information.

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:

NOTE: DO NOT USE IN PRODUCTION!

See the Cas module for more information.

Proxy

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

See the Cas module for more information.

Development

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

Project setup

Download all required PHP code by running:

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 to ./runner.yml and overriding relevant properties.

This command will also:

After a successful setup install the site by running:

This will:

Using Docker Compose

Alternatively, you can build a development site using Docker and Docker 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:

Configuration

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.

Usage

To start, run:

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:

Then:

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.

Using 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.

Running the tests

To run the grumphp checks:

To run the phpunit tests:

To run the behat tests:

Troubleshooting

Disable Drupal 8 caching

Manually disabling Drupal 8 caching is a laborious process that is well described here.

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

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.:

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

This is due to the following Drupal Console issue.

Contributing

Please read the full documentation for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the available versions, see the tags on this repository.


All versions of oe_auth with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
drupal/cas Version ^2.3
drupal/core Version ^10
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package openeuropa/oe_auth contains the following files

Loading the files please wait ....