Skip to content
Snippets Groups Projects

Use the new KC createdTimestamp property for integrity check

1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
@@ -227,7 +227,7 @@ class KeycloakIntegration {
throw new \Exception(sprintf('uid: %s Keycloak(%s=%s) does not match Drupal(%s=%s)', $uid, $kc_name, $kc_record[$kc_name], $drupal_name, $drupal_result[$drupal_name]));
}
}
if ($kc_record['attributes']['legacy_created'][0]/1000 !== (int) $drupal_result['created']) {
if ($kc_record['createdTimestamp']/1000 !== (int) $drupal_result['created']) {
throw new \Exception(sprintf('uid: %s Keycloak(legacy_created=%s) does not match Drupal(created=%s)', $uid, $kc_record['legacy_created'], $drupal_result['created']));
}
if (empty($kc_record['totp']) && !empty($drupal_result['tfa'])) {
Loading