Skip to content

Commit cac74ba

Browse files
committed
Spell out config
1 parent 8be0772 commit cac74ba

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

coderd/externalauth/externalauth.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,8 @@ func (c *Config) AppInstallations(ctx context.Context, token string) ([]codersdk
278278
}
279279

280280
type DeviceAuth struct {
281-
// Cfg is provided for the http client method.
282-
Cfg promoauth.InstrumentedOAuth2Config
281+
// Config is provided for the http client method.
282+
Config promoauth.InstrumentedOAuth2Config
283283
ClientID string
284284
TokenURL string
285285
Scopes []string
@@ -302,10 +302,10 @@ func (c *DeviceAuth) AuthorizeDevice(ctx context.Context) (*codersdk.ExternalAut
302302
}
303303

304304
do := http.DefaultClient.Do
305-
if c.Cfg != nil {
305+
if c.Config != nil {
306306
// The cfg can be nil in unit tests.
307307
do = func(req *http.Request) (*http.Response, error) {
308-
return c.Cfg.Do(ctx, promoauth.SourceAuthorizeDevice, req)
308+
return c.Config.Do(ctx, promoauth.SourceAuthorizeDevice, req)
309309
}
310310
}
311311

@@ -483,7 +483,7 @@ func ConvertConfig(instrument *promoauth.Factory, entries []codersdk.ExternalAut
483483
return nil, xerrors.Errorf("external auth provider %q: device auth url must be provided", entry.ID)
484484
}
485485
cfg.DeviceAuth = &DeviceAuth{
486-
Cfg: cfg,
486+
Config: cfg,
487487
ClientID: entry.ClientID,
488488
TokenURL: oc.Endpoint.TokenURL,
489489
Scopes: entry.Scopes,

0 commit comments

Comments
 (0)