Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc149f8f

Browse files
committed
Spell out config
1 parent9d1c76c commitc149f8f

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
typeDeviceAuthstruct {
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
ClientIDstring
284284
TokenURLstring
285285
Scopes []string
@@ -302,10 +302,10 @@ func (c *DeviceAuth) AuthorizeDevice(ctx context.Context) (*codersdk.ExternalAut
302302
}
303303

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

@@ -483,7 +483,7 @@ func ConvertConfig(instrument *promoauth.Factory, entries []codersdk.ExternalAut
483483
returnnil,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)

[8]ページ先頭

©2009-2025 Movatter.jp