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

Function ExternalAuthConfig

coderd/externalauth.go:419–431  ·  view source on GitHub ↗
(cfg *externalauth.Config)

Source from the content-addressed store, hash-verified

417}
418
419func ExternalAuthConfig(cfg *externalauth.Config) codersdk.ExternalAuthLinkProvider {
420 return codersdk.ExternalAuthLinkProvider{
421 ID: cfg.ID,
422 Type: cfg.Type,
423 Device: cfg.DeviceAuth != nil,
424 DisplayName: cfg.DisplayName,
425 DisplayIcon: cfg.DisplayIcon,
426 AllowRefresh: !cfg.NoRefresh,
427 AllowValidate: cfg.ValidateURL != "",
428 SupportsRevocation: cfg.RevokeURL != "",
429 CodeChallengeMethodsSupported: slice.ToStrings(cfg.CodeChallengeMethodsSupported),
430 }
431}
432
433func uriFromURL(u string) string {
434 uri, err := url.Parse(u)

Callers 1

ExternalAuthConfigsFunction · 0.70

Calls 1

ToStringsFunction · 0.92

Tested by

no test coverage detected