| 194 | } |
| 195 | |
| 196 | type Config struct { |
| 197 | // Name is a human friendly name to identify the oauth2 provider. This should be |
| 198 | // deterministic from restart to restart, as it is going to be used as a label in |
| 199 | // prometheus metrics. |
| 200 | name string |
| 201 | underlying OAuth2Config |
| 202 | metrics *metrics |
| 203 | // interceptors are called after every request made by the oauth2 client. |
| 204 | interceptors []func(resp *http.Response, err error) |
| 205 | } |
| 206 | |
| 207 | func (c *Config) Do(ctx context.Context, source Oauth2Source, req *http.Request) (*http.Response, error) { |
| 208 | cli := c.oauthHTTPClient(ctx, source) |
nothing calls this directly
no outgoing calls
no test coverage detected