{"repo":"robsontenorio/laravel-keycloak-guard","free":true,"listed":false,"github":"https://github.com/robsontenorio/laravel-keycloak-guard","clone":"git clone https://github.com/robsontenorio/laravel-keycloak-guard.git","description":"🔑 Simple Keycloak Guard for Laravel","language":"PHP","stars":519,"topics":["laravel","keycloak"],"license":"MIT","category":"auth-billing-email","readme_excerpt":"Simple Keycloak Guard for Laravel This package helps you authenticate users on a Laravel API based on JWT tokens generated from Keycloak Server . Requirements ✔️ I m building an API with Laravel. ✔️ I will not use Laravel Passport for authentication, because Keycloak Server will do the job. ✔️ The frontend is a separated project. ✔️ The frontend users authenticate directly on Keycloak Server to obtain a JWT token. This process have nothing to do with the Laravel API. ✔️ The frontend keep the JWT token from Keycloak Server. ✔️ The frontend make requests to the Laravel API, with that token. ❌ If your app does not match requirements, probably you are looking for https://socialiteproviders.com/Keycloak or https://github.com/Vizir/laravel-keycloak-web-guard The flow 1. The frontend user authenticates on Keycloak Server 1. The frontend user obtains a JWT token. 1. In another moment, the frontend user makes a request to some protected endpoint on a Laravel API, with that token. 1. The Laravel API (through Keycloak Guard ) handle it. - Verify token signature. - Verify token structure. - Verify token expiration time. - Verify if my API allows resource access from token. 1. If everything is ok, then find the user on database and authenticate it on my API. 1. Optionally, the user can be created / updated in the API users database. 1. Return response Install Require the package If you are using Lumen , register the provider in your boostrap app file bootstrap/app.php . For facades, uncom","default_branch":null,"files":null,"tree":[],"storefront":"/r/robsontenorio","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/robsontenorio/laravel-keycloak-guard/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}