-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8cf5a3a
commit 78b0670
Showing
919 changed files
with
142 additions
and
79,792 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,4 @@ | ||
package main | ||
|
||
import ( | ||
"github.com/klothoplatform/klotho/pkg/auth" | ||
"github.com/klothoplatform/klotho/pkg/cli" | ||
"github.com/spf13/pflag" | ||
) | ||
|
||
func main() { | ||
authRequirement := LocalAuth(false) | ||
km := cli.KlothoMain{ | ||
DefaultUpdateStream: "open:latest", | ||
Version: Version, | ||
PluginSetup: func(psb *cli.PluginSetBuilder) error { | ||
return psb.AddAll() | ||
}, | ||
Authorizer: &authRequirement, | ||
} | ||
|
||
km.Main() | ||
} | ||
|
||
// LocalAuth is an auth.Authorizer that requires login unless its value is true. | ||
type LocalAuth bool | ||
|
||
func (local *LocalAuth) SetUpCliFlags(flags *pflag.FlagSet) { | ||
flags.BoolVar((*bool)(local), "local", bool(*local), "If provided, runs Klotho with a local login (that is, not requiring an authenticated login)") | ||
} | ||
|
||
func (local *LocalAuth) Authorize() (auth.LoginInfo, error) { | ||
if !*local { | ||
return auth.Authorize() | ||
} | ||
return auth.LoginInfo{Authorizer: "local"}, nil | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.