Download the PHP package nti/keycloak-security-bundle without Composer
On this page you can find all versions of the php package nti/keycloak-security-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nti/keycloak-security-bundle
More information about nti/keycloak-security-bundle
Files in nti/keycloak-security-bundle
Package keycloak-security-bundle
Short Description Allows you to easily handle you application security thanks to keycloak.
License MIT
Informations about the package keycloak-security-bundle
NTI Keycloak Security Bundle
This Symfony bundle is an alternative solution to FOSUserBundle, working with keycloak.
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.
Route configuration
Create a new file in to load pre configured bundle routes.
Symfony security configuration
To link keycloak with symfony you must change the default security configuration in symfony.
Here is a simple configuration that restrict access to routes only to user with role "ROLE_ADMIN" :
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 that you can found here
TODO
- Install bundle configuration with flex recipe.
All versions of keycloak-security-bundle with dependencies
symfony/dependency-injection Version ^3.3 || ^4.0
symfony/framework-bundle Version ^3.0 || ^4.0
symfony/routing Version ^2.7|^3.0|^4.0
symfony/http-foundation Version ^2.7|^3.0|^4.0
knpuniversity/oauth2-client-bundle Version ~1.0
guzzlehttp/guzzle Version ^6.3