)]}'
{
  "commit": "4a323f734685e6c26aa9b2514c8afa30ef1be21d",
  "tree": "45c3065663c427f4cb1edf0d96e97555028b2504",
  "parents": [
    "4eca6b90f68f50e7ccae2ad447f145ae852411d1"
  ],
  "author": {
    "name": "David Ostrovsky",
    "email": "david@ostrovsky.org",
    "time": "Thu Oct 08 13:14:07 2026 +0200"
  },
  "committer": {
    "name": "David Ostrovsky",
    "email": "david@ostrovsky.org",
    "time": "Thu Oct 08 13:36:07 2026 +0200"
  },
  "message": "Support link-to-existing-gerrit-accounts for Keycloak\n\nThe SAP IAS and Discovery providers already honor\nlink-to-existing-gerrit-accounts: when set, a first browser login\nlinks to an existing Gerrit account by username instead of always\ncreating a new one. Add the same option to Keycloak, reusing that\nmechanism rather than inventing a new one.\n\nKeycloakUserInfoMapper gains the same map()/mapForBrowser() split as\nDiscoveryUserInfoMapper. map() (the Git-over-HTTP path) keeps a null\nclaimed identity. mapForBrowser(), when the flag is set, emits a\ngerrit:\u003cpreferred_username\u003e claimed identity, and fails closed if the\nflag is set but no preferred_username is present, so linking is never\nsilently skipped. Claimed identity is only read by the browser\nOAuthSession, so the Git path is unaffected by the flag.\n\nKeycloakOAuthService reads LINK_TO_EXISTING_GERRIT_ACCOUNT and maps\nbrowser claims via mapForBrowser(). KeycloakTokenValidator keeps mapping\nvia map(), so Git-over-HTTP continues to authenticate by external id\nonly. KeycloakInitStep prompts for the option like the Discovery init\nstep.\n\nFeature: https://github.com/davido/gerrit-oauth-provider/issues/181\nChange-Id: I19d01a6964be8c5432bd20bea0f061b07114d401\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ddb51b80990633c06260d4eb4f5b81f0127b589a",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/plugins/oauth/keycloak/KeycloakInitStep.java",
      "new_id": "dd715d7e17d3ab6b07afc28ce962d27a70f57d91",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/oauth/keycloak/KeycloakInitStep.java"
    },
    {
      "type": "modify",
      "old_id": "2a3e6005166e695652c8ec6786a62e0c7d4b1a80",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/plugins/oauth/keycloak/KeycloakOAuthService.java",
      "new_id": "4ae9fcfc7dd7ed2450e9ea3b504921cb8e193020",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/oauth/keycloak/KeycloakOAuthService.java"
    },
    {
      "type": "modify",
      "old_id": "01b17440b9441e1d868fc90b9dfcda0a36e84a1b",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/plugins/oauth/keycloak/KeycloakTokenValidator.java",
      "new_id": "042d81c0efab39473dd28339c8a0ab1d08ca3497",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/oauth/keycloak/KeycloakTokenValidator.java"
    },
    {
      "type": "modify",
      "old_id": "6bc063777ce8f63883b8dfafb048f4a27cb8c9b3",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/plugins/oauth/keycloak/KeycloakUserInfoMapper.java",
      "new_id": "04fa00bc900da6c4ea98c9d3fb0acc79b6ad1ac4",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/oauth/keycloak/KeycloakUserInfoMapper.java"
    },
    {
      "type": "modify",
      "old_id": "8f54be95dc5f2c620239b4e40486a613a5650847",
      "old_mode": 33188,
      "old_path": "src/main/resources/Documentation/config.md",
      "new_id": "a2e314b31ab34a4cc92fc3a7cd070bec160889d8",
      "new_mode": 33188,
      "new_path": "src/main/resources/Documentation/config.md"
    },
    {
      "type": "modify",
      "old_id": "68d83ce93293f02d0dbdb3672339d8a9441d1396",
      "old_mode": 33188,
      "old_path": "src/test/java/com/googlesource/gerrit/plugins/oauth/keycloak/KeycloakOAuthServiceTest.java",
      "new_id": "d40f4b90155d2236d2a5a354bce888abd2b7e569",
      "new_mode": 33188,
      "new_path": "src/test/java/com/googlesource/gerrit/plugins/oauth/keycloak/KeycloakOAuthServiceTest.java"
    },
    {
      "type": "modify",
      "old_id": "4b14a95d00813e9042a7af59f2ced5ace9234337",
      "old_mode": 33188,
      "old_path": "src/test/java/com/googlesource/gerrit/plugins/oauth/keycloak/KeycloakTokenValidatorTest.java",
      "new_id": "645eb5807061801f62b53a0fbc6e6ed74fefad12",
      "new_mode": 33188,
      "new_path": "src/test/java/com/googlesource/gerrit/plugins/oauth/keycloak/KeycloakTokenValidatorTest.java"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "c785891c03f656f61cfa454abff57f4a87d1a8cf",
      "new_mode": 33188,
      "new_path": "src/test/java/com/googlesource/gerrit/plugins/oauth/keycloak/KeycloakUserInfoMapperTest.java"
    }
  ]
}
