Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abame/symfony-keycloak-sso
SSO With Keycloak and Symfony 4.4
https://github.com/abame/symfony-keycloak-sso
docker keycloak nginx php php-fpm sso symfony
Last synced: 17 days ago
JSON representation
SSO With Keycloak and Symfony 4.4
- Host: GitHub
- URL: https://github.com/abame/symfony-keycloak-sso
- Owner: abame
- Created: 2021-05-23T09:47:16.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-06-10T09:24:52.000Z (over 3 years ago)
- Last Synced: 2024-11-25T16:14:35.021Z (3 months ago)
- Topics: docker, keycloak, nginx, php, php-fpm, sso, symfony
- Language: PHP
- Homepage:
- Size: 61.5 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Nginx PHP MySQL Keycloak SSO
## Run Application
To have the application running clone the repository and execute the following commands:
```sh
$ docker-compose build
$ docker composer up -d
```## Create database
First update the database configuration `DATABASE_URL` in `.env` file with the correct values and then run the following commands:
```sh
$ docker-composer exec php bin/console doctrine:database:create
$ docker-composer exec php bin/console doctrine:schema:update --force
```Update also `IDP_ENTITY_ID` and `IDP_XML_CONFIG` in `.env` file in case you change the configuration path for the xml metadata or entity id URL.
In case entity id URL is changed a new client has to be created in keycloak.
## Test the application
You can access the application in `http://127.0.0.1/` and try to login.
You will be redirected to keycloak UI to either login or register, and you will be redirected back to symfony application with a logged-in user session## Access Keycloak admin panel
The admin panel is accessible in `http://127.0.0.1:8080/auth/admin/` and you can login with username `root` and password `root`