Add skip daemon flag and send recently authed tokens to daemon (#3883)

* Add skip daemon flag and send recently authed tokens to daemon

* Rename flag skip-daemon to skip-cache-daemon

* adding option test

* move common.Options to base.Option

* SocketAddress returns *url.URL, fix search test
This commit is contained in:
Todd authored and Johan Brandhorst-Satzkorn committed 2024-01-05 07:43:20 -08:00
1 parent 2f7459fa40
commit 3a7ea64a31
27 files changed
+429 -419

No files matched your search

@@ -11,7 +11,6 @@ import (
"github.com/hashicorp/boundary/api/authmethods"
"github.com/hashicorp/boundary/globals"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/hashicorp/boundary/internal/cmd/common"
"github.com/hashicorp/boundary/internal/types/scope"
"github.com/mitchellh/cli"
"github.com/mitchellh/go-wordwrap"
@@ -104,15 +103,18 @@ func (c *Command) Run(args []string) int {
switch {
case strings.HasPrefix(c.FlagAuthMethodId, globals.PasswordAuthMethodPrefix):
cmd := PasswordCommand{Command: c.Command, Opts: []common.Option{common.WithSkipScopeIdFlag(true)}}
cmd := PasswordCommand{Command: c.Command}
cmd.Opts = append(c.Opts, base.WithSkipScopeIdFlag(true))
cmd.Run([]string{})
case strings.HasPrefix(c.FlagAuthMethodId, globals.OidcAuthMethodPrefix):
cmd := OidcCommand{Command: c.Command, Opts: []common.Option{common.WithSkipScopeIdFlag(true)}}
cmd := OidcCommand{Command: c.Command}
cmd.Opts = append(c.Opts, base.WithSkipScopeIdFlag(true))
cmd.Run([]string{})
case strings.HasPrefix(c.FlagAuthMethodId, globals.LdapAuthMethodPrefix):
cmd := LdapCommand{Command: c.Command, Opts: []common.Option{common.WithSkipScopeIdFlag(true)}}
cmd := LdapCommand{Command: c.Command}
cmd.Opts = append(c.Opts, base.WithSkipScopeIdFlag(true))
cmd.Run([]string{})
default: