Skip to content

Releases: robsontenorio/laravel-keycloak-guard

Proper handling of token without resource_access

02 May 09:42
310d628
Compare
Choose a tag to compare

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

04 Feb 19:34
513c29c
Compare
Choose a tag to compare

✔️ 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()

24 Nov 11:40
e8f4675
Compare
Choose a tag to compare

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()

27 Oct 02:56
Compare
Choose a tag to compare
Merge branch 'master' of https://github.com/robsontenorio/laravel-key…

…cloak-guard

Fix buildPublicKey()

28 Aug 04:16
6846004
Compare
Choose a tag to compare
Merge pull request #2 from robsontenorio/fix-build-public-key

Fix buildPublicKey()

Improving tests

24 Jul 16:18
Compare
Choose a tag to compare
1.1.2

Testings

Handle Exceptions

22 Jul 22:33
Compare
Choose a tag to compare
1.1.1

Handling exceptions

1.1.0

22 Jul 04:40
Compare
Choose a tag to compare
New options

Initial release

20 Jul 06:06
Compare
Choose a tag to compare

Let`s do it!