mirror of
https://github.com/davidallendj/opaal.git
synced 2025-12-20 03:27:02 -07:00
Added ability to get authorization code
This commit is contained in:
parent
bfcbca9cf1
commit
5bae300daa
9 changed files with 174 additions and 48 deletions
|
|
@ -7,7 +7,10 @@ import (
|
|||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var configPath = ""
|
||||
var (
|
||||
configPath = ""
|
||||
config Config
|
||||
)
|
||||
var rootCmd = &cobra.Command{
|
||||
Use: "oidc",
|
||||
Short: "An experimental OIDC helper tool for handling logins",
|
||||
|
|
@ -18,11 +21,11 @@ var rootCmd = &cobra.Command{
|
|||
|
||||
func Execute() {
|
||||
if err := rootCmd.Execute(); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Whoops. There was an error while executing your CLI '%s'", err)
|
||||
fmt.Fprintf(os.Stderr, "failed to start CLI: %s", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
rootCmd.Flags().StringVar(&configPath, "config", "", "set the config path")
|
||||
rootCmd.PersistentFlags().StringVar(&configPath, "config", "", "set the config path")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue