auth

package
v1.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AuthCmd = &cobra.Command{
	Use:   "auth",
	Short: "",
	Long:  "",
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("TODO - List available 'auth' commands")
	},
}

AuthCmd - `iron auth`

View Source
var MFACmd = &cobra.Command{
	Use:   "mfa",
	Short: "",
	Long:  "",
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("TODO - List available 'auth mfa' commands")
	},
}

MFACmd - `iron auth mfa`

View Source
var MFARecoveryCmd = &cobra.Command{
	Use:   "recovery",
	Short: "Recovery MFA",
	Long:  "Recovery MFA for the currently logged in user",
	Run: func(cmd *cobra.Command, args []string) {
		err := auth.MFARecovery(args, flags.Acc)
		if err != nil {
			fmt.Println()
			color.Red(err.Error())

			os.Exit(1)
		}
	},
}

MFARecoveryCmd - `iron auth mfa recovery`

View Source
var SetActiveCmd = &cobra.Command{
	Use:   "set-active [email]",
	Short: "Set credential as active",
	Long:  "Set credential as active",
	Run: func(cmd *cobra.Command, args []string) {
		err := auth.IronstarSetActiveCredentials(args, flags.Acc)
		if err != nil {
			if strings.ToLower(flags.Acc.Output) == "json" {
				utils.PrintErrorJSON(err)
				os.Exit(1)
			}

			fmt.Println()
			color.Red(err.Error())

			os.Exit(1)
		}
	},
}

SetActiveCmd - `iron auth set-active [email]`

View Source
var ShowCmd = &cobra.Command{
	Use:   "show",
	Short: "Show available credentials",
	Long:  "Show available credentials for the Ironstar API and how they map against your projects",
	Run: func(cmd *cobra.Command, args []string) {
		err := auth.IronstarShowCredentials(args, flags.Acc)
		if err != nil {
			if strings.ToLower(flags.Acc.Output) == "json" {
				utils.PrintErrorJSON(err)
				os.Exit(1)
			}

			fmt.Println()
			color.Red(err.Error())

			os.Exit(1)
		}
	},
}

ShowCmd - `iron auth show`

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL