)]}'
{
  "commit": "a835fc4358f6852f50c4c5c33fddcd1adade5b0a",
  "tree": "52163771dbfbbe7384a704fa23d42447ed3c0a39",
  "parents": [
    "2e4a4e2bfb69ca7609cb423438c55caa131431c1"
  ],
  "author": {
    "name": "Brad Fitzpatrick",
    "email": "bradfitz@golang.org",
    "time": "Thu Aug 03 09:40:32 2023 -0700"
  },
  "committer": {
    "name": "Brad Fitzpatrick",
    "email": "bradfitz@golang.org",
    "time": "Wed Aug 09 17:53:10 2023 +0000"
  },
  "message": "oauth2: move global auth style cache to be per-Config\n\nIn 80673b4a4 (https://go.dev/cl/157820) I added a never-shrinking\npackage-global cache to remember which auto-detected auth style (HTTP\nheaders vs POST) was supported by a certain OAuth2 server, keyed by\nits URL.\n\nUnfortunately, some multi-tenant SaaS OIDC servers behave poorly and\nhave one global OpenID configuration document for all of their\ncustomers which says (\"we support all auth styles! you pick!\") but\nthen give each customer control of which style they specifically\naccept. This is bogus behavior on their part, but the oauth2 package\u0027s\nglobal caching per URL isn\u0027t helping. (It\u0027s also bad to have a\npackage-global cache that can never be GC\u0027ed)\n\nSo, this change moves the cache to hang off the oauth *Configs\ninstead. Unfortunately, it does so with some backwards compatiblity\ncompromises (an atomic.Value hack), lest people are using old versions\nof Go still or copying a Config by value, both of which this package\npreviously accidentally supported, even though they weren\u0027t tested.\n\nThis change also means that anybody that\u0027s repeatedly making ephemeral\noauth.Configs without an explicit auth style will be losing \u0026\nreinitializing their cache on any auth style failures + fallbacks to\nthe other style. I think that should be pretty rare. People seem to\nmake an oauth2.Config once earlier and stash it away somewhere (often\ndeep in a token fetcher or HTTP client/transport).\n\nChange-Id: I91f107368ab3c3d77bc425eeef65372a589feb7b\nSigned-off-by: Brad Fitzpatrick \u003cbradfitz@golang.org\u003e\nReviewed-on: https://go-review.googlesource.com/c/oauth2/+/515675\nTryBot-Result: Gopher Robot \u003cgobot@golang.org\u003e\nReviewed-by: Roland Shoemaker \u003croland@golang.org\u003e\nReviewed-by: Adrian Dewhurst \u003cadrian@tailscale.com\u003e\nReviewed-by: Michael Knyszek \u003cmknyszek@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "7a0b9ed1029e2f821f087816de82915749e27a37",
      "old_mode": 33188,
      "old_path": "clientcredentials/clientcredentials.go",
      "new_id": "2459d069f734170e6cf9c2406a8000760d545867",
      "new_mode": 33188,
      "new_path": "clientcredentials/clientcredentials.go"
    },
    {
      "type": "modify",
      "old_id": "02a1c89a839ccb11e4127ddddfd422e3d6af649c",
      "old_mode": 33188,
      "old_path": "clientcredentials/clientcredentials_test.go",
      "new_id": "078e75ec78bfd6a3b81973577ba25e7b7fef2977",
      "new_mode": 33188,
      "new_path": "clientcredentials/clientcredentials_test.go"
    },
    {
      "type": "modify",
      "old_id": "58901bda53e5f30d22dafbaa715a6bd57c5f2dbf",
      "old_mode": 33188,
      "old_path": "internal/token.go",
      "new_id": "e83ddeef0fc296a947d6b5811c32398f6fd564f1",
      "new_mode": 33188,
      "new_path": "internal/token.go"
    },
    {
      "type": "modify",
      "old_id": "c54095ab5293a1e8875b9dc8966daef54e678d85",
      "old_mode": 33188,
      "old_path": "internal/token_test.go",
      "new_id": "c08862ae636975d90eef6324c59031d057311581",
      "new_mode": 33188,
      "new_path": "internal/token_test.go"
    },
    {
      "type": "modify",
      "old_id": "9085fabe34eaf0596ef8b2cbf3fddbd73c4e4e0d",
      "old_mode": 33188,
      "old_path": "oauth2.go",
      "new_id": "cc7c98c25ddf07a9d43490eb84fb256cbae875d9",
      "new_mode": 33188,
      "new_path": "oauth2.go"
    },
    {
      "type": "modify",
      "old_id": "a3517767d4c3ceb27f7b1f407384eb7fb8862715",
      "old_mode": 33188,
      "old_path": "oauth2_test.go",
      "new_id": "37f0580d7b4c60db1cb147496724aa104bf8658d",
      "new_mode": 33188,
      "new_path": "oauth2_test.go"
    },
    {
      "type": "modify",
      "old_id": "5ffce9764be7fb37766c1680ea532e78755e9711",
      "old_mode": 33188,
      "old_path": "token.go",
      "new_id": "5bbb33217488536161a314ec4180f3c332314ede",
      "new_mode": 33188,
      "new_path": "token.go"
    }
  ]
}
