Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Security/User/KeycloakUserProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ function ($role) {
);
}

if (empty($roles) && empty($resourceOwner->getResourceAccess())) {
throw new \RuntimeException('ResourceAccess is empty, ensure that in the keycloak realm configuration client scope "client roles" is available for userinfo');
}

if (isset($resourceOwner->getResourceAccess()[$provider->getClientId()])) {
$roles = array_map(
function ($role) {
Expand Down