Download the PHP package idci/keycloak-security-bundle without Composer

On this page you can find all versions of the php package idci/keycloak-security-bundle. 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 keycloak-security-bundle

IDCI Keycloak Security Bundle

This Symfony bundle is an alternative solution to FOSUserBundle, working with keycloak.

For symfony 2/3/4 use version 1.2.0 For symfony 5+ use version 2.0.0 or +

Installation

With composer:

Configuration

If you want to set up keycloak locally you can download it here and follow instructions from the official documentation. In case that you want to use keycloak in docker go directly to configuration for Docker.

Bundle configuration

Basic

In case of you already have keycloak running locally on your machine or is running remotely but without proxy, here is the default configuration you should use:

Docker

If you want to use keycloak in docker you can base your stack on this sample.

Here is a stack example configuration for docker swarm:

Make sure that your php container in the container is attached to a network with keycloak, otherwise it will not be able to resolve "http://keycloak:8080/auth" and the public_server_url must be accessible through the port 80 because keycloak verify the issuer.

NOTE: The keycloak api endpoint as change, so if you used an old version, add the /auth to you url:

Route configuration

Create a new file in to load pre configured bundle routes.

This will add the following routes to your application:

Symfony security configuration

To link keycloak with symfony you must configure your application security file.

Here is a simple configuration that restrict access to routes only to user with roles "ROLE_USER" or "ROLE_ADMIN" :

Note: If you wish to secure your application using OAuth 2 Authorization Code Flow for route starting with /admin, you will have to put the provided bundle routes behind the firewall, so here is an example on how to do this:

Keycloak configuration

If you need help to use keycloak because it is the first time you work on it, we've made a little tutorial step by step describing a basic configuration of a keycloak realm:

Logout

To logout users, use the route 'idci_keycloak_security_auth_logout':

Keycloak user account space

If you wants to provide a link to access keycloak user account space, use the route 'idci_keycloak_security_auth_account':


All versions of keycloak-security-bundle with dependencies

PHP Build Version
Package Version
Requires symfony/dependency-injection Version ^5.3|^6.0
symfony/framework-bundle Version ^5.3|^6.0
symfony/http-client Version ^5.3|^6.0
symfony/routing Version ^5.3|^6.0
symfony/security-bundle Version ^5.3|^6.0
symfony/http-foundation Version ^5.3|^6.0
knpuniversity/oauth2-client-bundle 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 idci/keycloak-security-bundle contains the following files

Loading the files please wait ....