)]}'
{
  "commit": "775e886efab693987170bead272f86159ea3fd1a",
  "tree": "11f7639708fcb0f4514578ec4482fa8a5052dac6",
  "parents": [
    "42bd33146977e837e0a33aa08dc759e0ef72fae1"
  ],
  "author": {
    "name": "David Ostrovsky",
    "email": "david@ostrovsky.org",
    "time": "Sun Mar 22 10:08:12 2026 +0100"
  },
  "committer": {
    "name": "David Ostrovsky",
    "email": "david@ostrovsky.org",
    "time": "Mon Mar 23 09:01:17 2026 +0100"
  },
  "message": "Discovery OAuth: Validate discovery config and add tests\n\nRefactor the DiscoveryOAuthService to improve robustness and\nmaintainability.\n\n* Validation:\n  - Add validateRootUrl to ensure the configured root-url is valid and\n    uses http/https.\n  - Add validateDiscoveryDocument to verify that the provider\u0027s\n    response contains all required OIDC endpoints (issuer, auth,\n    token, and userinfo) and that they are absolute URLs.\n  - Automatically trim trailing slashes from the root-url to prevent\n    double-slashes in the final discovery path.\n  - Add null-safety checks in DiscoveryApi.\n\n* Performance:\n  - Use Guava\u0027s CharStreams for more efficient stream-to-string\n    conversion, replacing manual BufferedReader loops.\n\n* Testing:\n  - Add DiscoveryApiTest for unit testing the ScribeJava API bridge.\n  - Add DiscoveryOAuthServiceTest with high coverage, including\n    mocking the discovery process and testing various failure modes\n    (malformed URLs, missing JSON fields, and HTTP errors).\n\nFeature: https://github.com/davido/gerrit-oauth-provider/issues/134\nChange-Id: I961c0a0e13511c4134e24a98c36e83aa12ea5c3c\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "4583e89ae0112e6b08c8184d0432e4aa4e9672b7",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/plugins/oauth/discovery/DiscoveryApi.java",
      "new_id": "0f7df65f2256fc1f30b963bbbcd46506997cd98c",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/oauth/discovery/DiscoveryApi.java"
    },
    {
      "type": "modify",
      "old_id": "24f732fce0b797316a897ab37246b8e5b4b0c3f1",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/plugins/oauth/discovery/DiscoveryOAuthService.java",
      "new_id": "8923dcf94fc30ab442435f5046bcc436f0308631",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/oauth/discovery/DiscoveryOAuthService.java"
    },
    {
      "type": "modify",
      "old_id": "23016635eaf3541c5cc51dea59cec2c82fbf0ade",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/plugins/oauth/discovery/DiscoveryOpenIdConnect.java",
      "new_id": "6608ab67215d7cac93e2c0986f778b681d7e9e8e",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/oauth/discovery/DiscoveryOpenIdConnect.java"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "d250264b16f4496c32342aa51ca102f53185eede",
      "new_mode": 33188,
      "new_path": "src/test/java/com/googlesource/gerrit/plugins/oauth/discovery/DiscoveryApiTest.java"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "214664d6b947e6cd749e547f4e70ff8fa54a2656",
      "new_mode": 33188,
      "new_path": "src/test/java/com/googlesource/gerrit/plugins/oauth/discovery/DiscoveryOAuthServiceTest.java"
    }
  ]
}
