Exemplo de aplicação com adaptador de keycloak / php / laravel
.
Criando custom Guard e UserProvider. Autorização implementada com Gates.
Utilizamos os pacotes:
https://github.com/thephpleague/oauth2-client
$ composer require league/oauth2-client:2.2.1
https://github.com/paragonie/random_compat
$ composer require paragonie/random_compat:v2.0.9
https://github.com/stevenmaguire/oauth2-keycloak
$ composer require stevenmaguire/oauth2-keycloak