use time.Duration in token expiry env vars

This commit is contained in:
dhax 2017-10-12 15:23:44 +02:00
parent 89609ae5e6
commit eb928912af
5 changed files with 15 additions and 15 deletions

View file

@ -38,15 +38,15 @@ func init() {
RootCmd.AddCommand(serveCmd)
// Here you will define your flags and configuration settings.
viper.SetDefault("port", "3000")
viper.SetDefault("port", "localhost:3000")
viper.SetDefault("log_level", "debug")
viper.SetDefault("auth_login_url", "http://localhost:3000/login")
viper.SetDefault("auth_login_token_length", 8)
viper.SetDefault("auth_login_token_expiry", 11) // expiry in minutes
viper.SetDefault("auth_login_token_expiry", "11m")
viper.SetDefault("auth_jwt_secret", "random")
viper.SetDefault("auth_jwt_expiry", 15)
viper.SetDefault("auth_jwt_refresh_expiry", 60)
viper.SetDefault("auth_jwt_expiry", "15m")
viper.SetDefault("auth_jwt_refresh_expiry", "1h")
// Cobra supports Persistent Flags which will work for this command
// and all subcommands, e.g.: