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

Method MutateConfig

coderd/coderdtest/oidctest/idp.go:134–141  ·  view source on GitHub ↗

MutateConfig is a helper function to mutate the oauth2.Config. Beware of re-entrant locks!

(fn func(cfg *oauth2.Config))

Source from the content-addressed store, hash-verified

132// MutateConfig is a helper function to mutate the oauth2.Config.
133// Beware of re-entrant locks!
134func (f *fakeIDPLocked) MutateConfig(fn func(cfg *oauth2.Config)) {
135 f.mu.Lock()
136 if f.cfg == nil {
137 f.cfg = &oauth2.Config{}
138 }
139 fn(f.cfg)
140 f.mu.Unlock()
141}
142
143func (f *fakeIDPLocked) SetHandler(handler http.Handler) {
144 f.mu.Lock()

Callers 2

SetRedirectMethod · 0.80
OauthConfigMethod · 0.80

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected