Skip to content

Commit

Permalink
improve error message information and grammar (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
hamidhaghdoost authored Dec 6, 2024
1 parent c843786 commit fc8856c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/KeycloakGuard.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ protected function validateResources()
$allowed_resources = explode(',', $this->config['allowed_resources']);

if (count(array_intersect($token_resource_access, $allowed_resources)) == 0) {
throw new ResourceAccessNotAllowedException("The decoded JWT token has not a valid `resource_access` allowed by API. Allowed resources by API: ".$this->config['allowed_resources']);
throw new ResourceAccessNotAllowedException("The decoded JWT token does not have a valid `resource_access` permission allowed by the API. Allowed resources: " . $this->config['allowed_resources'] . ". Token resources: " . json_encode($token_resource_access));
}
}

Expand Down

0 comments on commit fc8856c

Please sign in to comment.