robsontenorio / laravel-keycloak-guard

🔑 Simple Keycloak Guard for Laravel
MIT License
434 stars 141 forks source link

Add the possibility of ignoring the **allowed_resources** control #67

Closed alecberney closed 2 years ago

alecberney commented 2 years ago

If the allowed_resources is not present in the JWT, it produce this error: KeycloakGuard\Exceptions\ResourceAccessNotAllowedException: [Keycloak Guard] The decoded JWT token has not a validresource_accessallowed by API. Allowed resources by API: in file /var/www/html/vendor/robsontenorio/laravel-keycloak-guard/src/KeycloakGuard.php on line 169

It can be really usefull if you want to manage your roles in the app and be more flexible to change the auth keycloak realm for example. Also, some keycloak realm that you need to be authenticated don't give this param and it's a problem for the package.

robsontenorio commented 2 years ago

Resolved by #77