Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove external authenticator support #99

Merged
merged 1 commit into from
Oct 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 0 additions & 70 deletions auth/external_authenticator.go

This file was deleted.

13 changes: 0 additions & 13 deletions auth/external_authenticator_config.go

This file was deleted.

6 changes: 0 additions & 6 deletions config/authenticator_yaml.go

This file was deleted.

19 changes: 0 additions & 19 deletions config/plugin_config.go

This file was deleted.

44 changes: 0 additions & 44 deletions config/plugin_config_file_store.go

This file was deleted.

45 changes: 0 additions & 45 deletions config/plugin_config_provider.go

This file was deleted.

88 changes: 0 additions & 88 deletions config/plugin_config_provider_test.go

This file was deleted.

6 changes: 0 additions & 6 deletions config/plugin_config_store.go

This file was deleted.

5 changes: 0 additions & 5 deletions config/plugins_yaml.go

This file was deleted.

23 changes: 4 additions & 19 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,12 @@ import (
//go:embed definitions/*.yaml
var embedded embed.FS

func authenticators(pluginsCfg config.PluginConfig) []auth.Authenticator {
authenticators := []auth.Authenticator{}
for _, authenticator := range pluginsCfg.Authenticators {
authenticators = append(authenticators, auth.NewExternalAuthenticator(
*auth.NewExternalAuthenticatorConfig(authenticator.Name, authenticator.Path),
))
}
return append(authenticators,
func authenticators() []auth.Authenticator {
return []auth.Authenticator{
auth.NewPatAuthenticator(),
auth.NewOAuthAuthenticator(cache.NewFileCache(), auth.NewExecBrowserLauncher()),
auth.NewBearerAuthenticator(cache.NewFileCache()),
)
}
}

func colorsSupported() bool {
Expand All @@ -58,17 +52,8 @@ func main() {
fmt.Fprintln(os.Stderr, err.Error())
os.Exit(131)
}
pluginConfigProvider := config.NewPluginConfigProvider(
config.NewPluginConfigFileStore(os.Getenv("UIPATH_PLUGINS_PATH")),
)
err = pluginConfigProvider.Load()
if err != nil {
fmt.Fprintln(os.Stderr, err.Error())
os.Exit(132)
}

pluginConfig := pluginConfigProvider.Config()
authenticators := authenticators(pluginConfig)
authenticators := authenticators()
cli := commandline.NewCli(
os.Stdin,
os.Stdout,
Expand Down