oidcMCPTokenSource implements mcpclient.UserOIDCTokenSource using the same refresh strategy as provisionerdserver.ObtainOIDCAccessToken. The logic is duplicated to avoid importing provisionerdserver from coderd; keep the two in sync.
| 37 | // The logic is duplicated to avoid importing provisionerdserver from |
| 38 | // coderd; keep the two in sync. |
| 39 | type oidcMCPTokenSource struct { |
| 40 | db database.Store |
| 41 | config promoauth.OAuth2Config |
| 42 | logger slog.Logger |
| 43 | } |
| 44 | |
| 45 | // newOIDCMCPTokenSource returns nil when no OIDC provider is |
| 46 | // configured. mcpclient treats a nil source the same as "no token |
nothing calls this directly
no outgoing calls
no test coverage detected