MutateConfig is a helper function to mutate the oauth2.Config. Beware of re-entrant locks!
(fn func(cfg *oauth2.Config))
| 132 | // MutateConfig is a helper function to mutate the oauth2.Config. |
| 133 | // Beware of re-entrant locks! |
| 134 | func (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 | |
| 143 | func (f *fakeIDPLocked) SetHandler(handler http.Handler) { |
| 144 | f.mu.Lock() |
no test coverage detected