Download the PHP package causal/oidc without Composer

On this page you can find all versions of the php package causal/oidc. 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 oidc

OpenID Connect integration for TYPO3

Introduction

Using this TYPO3 extension enables your TYPO3 instance to use external identity providers (IdPs) to authenticate frontend and/or backend users using the OpenID Connect protocol.

This allows to leverage Single-Sign-On (SSO) scenarios.

After installing and configuring the extension, users will have a dedicated button to login via the configured IdP and will be returned to TYPO3 with an active session.

Various configuration options allow to map information retrieved from the IdP to the TYPO3 user record. For instance: Name, contact data, groups/roles

Identity provider examples

This is an incomplete list of well-known identity providers:

Usage for frontend

Next to ext:felogin

The login can be triggered by a button, which can be placed next to your existing felogin form. So you can use both login-mechanisms in parallel.

After the login process, the user will be redirected according to the rules defined in the felogin plugin on the same page.

Direct OIDC Login

If OpenID Connect is your only means of frontend login, you can use the included "OIDC Login" plugin. Add it to your login page, where you would normally put the felogin form. After adding the OIDC Login plugin, requests to the login page will immediately be redirected to the identity provider.

After the login process, the user will be redirected:

Usage for backend

If enabled, the extension provides a login provider for backend of the TYPO3 instance.

Configuration

Configuration is done through a YAML file located in the TYPO3 system config directory : config/system/oidc.yaml

The extension requires at least a configuration for how user information from the IdP is mapped to TYPO3 user records fe_users/be_users.

Mapping user fields

Mapping user groups

It is possible to assign TYPO3 user groups to a user based on the Roles attribute sent via OIDC.

Steps to follow:

OIDC Login plugin TypoScript configuration

PKCE (Proof of Key for Code Exchange)

If your IdP supports Proof of Key for Code Exchange you can enable it by setting enableCodeVerifier in the extension configuration. A shared secret will be sent along preventing Authorization Code Interception Attacks. See RFC7636 for details.

Logging

For debugging purposes it may be helpful to enable DEBUG-level logging. In addition, rerouting all log lines to a dedicated file is also recommended.

The following instructions in your sitepackage's ext_localconf.php or global config/system/additional.php file will configure the system appropriately:

Hint: Be sure to read Configuration of the Logging system to fine-tune your configuration on any production website.

Integrating your identity provider with specific packages

This extension uses an underlying PHP library for OAuth2, which can be extended for specific identity providers by adding additional packages.

Example: For Microsoft EntraID (Azure) the package is thenetworg/oauth2-azure

In order to use these kinds of packages, one needs to implement a custom OAuth2ProviderFactory, which takes care of initializing the specific provider.

Here is an example for the aforementioned Azure package.

Register your custom factory class in the extension configuration oauthProviderFactory = \Reelworx\Sitesetup\Authentication\OAuth2ProviderFactory. Put this class into your site-package, typically in the file packages/<sitepackage>/Classes/Autentication/OAuth2ProviderFactory.php:

Developer information

For customization purposes this extension provides 8 events. Please lookup their usage within the code to identify the right event(s) matching your requirements.

Maintainer's corner

Running acceptance tests

The Build folder contains a docker compose test environment for this oidc extension. It contains:

To build the test environment and run the playwright tests run the following command:

Reference

Implementation concept

This extension builds a wrapper around the league/oauth2-client PHP library. It provides TYPO3 AuthenticationServices which integrate the authentication with frontend and backend.

In order to encapsulate and store the "state" parameter recommended for the request towards the IdP, the extensions creates a JWT stored in a cookie. This allows for state-less authentication flow, helpful for multi-server setups, where shared PHP-sessions are hard to implement. (Note the distinction between PHP- and anonymous TYPO3-session here. During the authentication phase there is no TYPO3-session available yet, so the "state" would have to be stored within a PHP-session.)

Specification

https://openid.net/specs/openid-connect-core-1_0.html

Credits

This TYPO3 extension is created and maintained by:

A big "Thanks" goes out to all contributors.


All versions of oidc with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
ext-json Version *
guzzlehttp/psr7 Version ^2.7
typo3/cms-core Version ^13.4.14 || ^14.3
typo3/cms-frontend Version ^13.4 || ^14.3
typo3/cms-lowlevel Version ^13.4 || ^14.3
typo3/cms-install Version ^13.4 || ^14.3
symfony/http-foundation Version ^7.2
league/oauth2-client Version ^2.9
firebase/php-jwt Version ^7.0.2
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 causal/oidc contains the following files

Loading the files please wait ...