Download the PHP package gl-events/sylius-admin-saml-plugin without Composer

On this page you can find all versions of the php package gl-events/sylius-admin-saml-plugin. 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 sylius-admin-saml-plugin

GL events SyliusAdminSamlPlugin

Features

This plugin allow your admin users to sign in with SAML providers (Google, Azure, Okta, etc.)

Installation

  1. Add the bundle to your composer.json file:

  2. Add the plugin class to your config/bundles.php file:

  3. Import the plugin defaults (registers the SSO button hook and the login-page Twig globals):

  4. Configure the plugin. Everything is set through the bundle configuration, no dedicated env vars are required. Generate the SP private key with openssl genpkey -algorithm RSA -out private.key:

    Every setting is optional and defaults to an empty string (proxy_vars to false, admin_login/sso_login to true); a missing SAML setting simply makes the SSO login fail at runtime (flash + redirect back to the login page), it never breaks the app boot. Any value may still reference an env var if you prefer, e.g. certificate: '%env(SAML_IDP_CERTIFICATE)%'.

  5. Wrap the traditional admin login form so it can be toggled with admin_login.

    The plugin does not override the core Sylius admin login hooks (a plugin must never override the host app's defaults). Gate the whole form with a single hook override in config/packages/sylius_twig_hooks.yaml:

    This wraps the entire <form> (fields + CSRF) in the admin_login condition, so in SSO-only mode the form disappears cleanly. The SSO button hook is provided by the plugin on the sibling sylius_admin.security.login.page.content hook, so it stays visible regardless.

  6. Add in your config/security.yaml file:

  7. Add in your config/routes.yaml file:

  8. If your application runs behind a reverse proxy (load balancer, Kubernetes ingress, etc.) that terminates SSL, set proxy_vars: true in your gl_events_sylius_admin_saml config:

This tells the onelogin/php-saml library to read X-Forwarded-Proto, X-Forwarded-Host and X-Forwarded-Port headers when building the current URL for SAML response validation. Without this, the library detects http:// instead of https:// and rejects the SAML response with an error like "The response was received at http://... instead of https://...".

Also verify your Symfony trusted_proxies and trusted_headers settings so that $request->getScheme() also returns the correct scheme, see: https://symfony.com/doc/current/deployment/proxies.html#but-what-if-the-ip-of-my-reverse-proxy-changes-constantly

  1. You are now ready to go ! 🚀

Credits

Developed by GL Events.


All versions of sylius-admin-saml-plugin with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
sylius/sylius Version ~2.0
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 gl-events/sylius-admin-saml-plugin contains the following files

Loading the files please wait ...