MCPcopy Index your code
hub / github.com/coder/coder / InstrumentedOAuth2Config

Interface InstrumentedOAuth2Config

coderd/promoauth/oauth2.go:49–55  ·  view source on GitHub ↗

InstrumentedOAuth2Config extends OAuth2Config with a `Do` method that allows external oauth related calls to be instrumented. This is to support "ValidateToken" which is not an oauth2 specified method. These calls still count against the api rate limit, and should be instrumented.

Source from the content-addressed store, hash-verified

47// "ValidateToken" which is not an oauth2 specified method.
48// These calls still count against the api rate limit, and should be instrumented.
49type InstrumentedOAuth2Config interface {
50 OAuth2Config
51
52 // Do is provided as a convenience method to make a request with the oauth2 client.
53 // It mirrors `http.Client.Do`.
54 Do(ctx context.Context, source Oauth2Source, req *http.Request) (*http.Response, error)
55}
56
57var _ OAuth2Config = (*Config)(nil)
58

Implementers 8

WorkspaceBuildBuildercoderd/database/dbfake/dbfake.go
ProvisionerJobResourcesBuildercoderd/database/dbfake/dbfake.go
TemplateVersionBuildercoderd/database/dbfake/dbfake.go
JobCompleteBuildercoderd/database/dbfake/dbfake.go
OrganizationBuildercoderd/database/dbfake/builder.go
Configcoderd/promoauth/oauth2.go
OAuth2Configtestutil/oauth2.go
trySingleflightagent/agent.go

Calls

no outgoing calls

Tested by

no test coverage detected