refresh

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RefreshCmd = &cobra.Command{
	Use:   "refresh",
	Short: "Refresh Cognito access and ID tokens",
	Run: func(cmd *cobra.Command, args []string) {
		var configuration *config.CognitoConfig
		config.CheckIfCognitoIsInitialized()
		if config, e := config.GetCognitoConfig(); e != nil {
			if strings.Contains(e.Error(), "Invalid region") {
				color.Red("Spark has not been initialized. Please run 'spark init' to initialize Spark.")
			} else {
				color.Red("Error getting config: %v", e.Error())
			}
			os.Exit(1)
		} else {
			configuration = config
		}

		cognitoClient := cognito.New(configuration)

		cognitoClient.RefreshTokens()
	},
}

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