Releases: robsontenorio/laravel-keycloak-guard
Releases · robsontenorio/laravel-keycloak-guard
Proper handling of token without resource_access
Thanks @cunio-martin for #9
Handle the scenario when JWT has no resource_access defined (Undefined property: stdClass::$resource_access)
Allows authentication without "users" table
✔️ load_user_from_database
Required. Default is true
.
If you do not have an users
table you must disable this.
It fetchs user from database and fill values into authenticated user object. If enabled, it will work together with user_provider_credential
and user_provider_credential
.
Add hasRole()
hasRole('some-resource', 'some-role'): Check if the authenticated user has especific role into a resource.
Ex: Whit this payload:
'resource_access' => [
'myapp-backend' => [
'roles' => [
'myapp-backend-role1',
'myapp-backend-role2'
]
],
'myapp-frontend' => [
'roles' => [
'myapp-frontend-role1',
'myapp-frontend-role2'
]
]
]
Auth::hasRole('myapp-backend', 'myapp-backend-role1') => true
Auth::hasRole('myapp-frontend', 'myapp-frontend-role1') => true
Auth::hasRole('myapp-backend', 'myapp-frontend-role1') => false
Implements hasUser()
1.1.4 Merge branch 'master' of https://github.com/robsontenorio/laravel-key…
Fix buildPublicKey()
Merge pull request #2 from robsontenorio/fix-build-public-key Fix buildPublicKey()
Improving tests
1.1.2 Testings
Handle Exceptions
1.1.1 Handling exceptions
1.1.0
New options
Initial release
Let`s do it!