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.
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 valid
resource_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.