MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / newAuthLoginCmd

Function newAuthLoginCmd

app/cli/cmd/auth_login.go:42–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40}
41
42func newAuthLoginCmd() *cobra.Command {
43 var forceHeadlessLogin bool
44 cmd := &cobra.Command{
45 Use: "login",
46 Short: "authenticate the CLI with the Control Plane",
47 RunE: func(cmd *cobra.Command, args []string) error {
48 return interactiveAuth(forceHeadlessLogin)
49 },
50 }
51
52 cmd.Flags().BoolVar(&forceHeadlessLogin, "skip-browser", false, "perform a headless login process without opening a browser")
53 return cmd
54}
55
56func interactiveAuth(forceHeadless bool) error {
57 var a app

Callers 1

newAuthCmdFunction · 0.85

Calls 1

interactiveAuthFunction · 0.85

Tested by

no test coverage detected