14 lines
535 B
Go
14 lines
535 B
Go
package models
|
|
|
|
import "time"
|
|
|
|
type JWTConfig struct {
|
|
Secret string `env:"JWT_SECRET" default:""`
|
|
TokenDuration time.Duration `env:"JWT_TOKEN_DURATION" default:"24h"`
|
|
KeyGenerate bool `env:"JWT_KEY_GENERATE" default:"true"`
|
|
KeyDir string `env:"JWT_KEY_DIR" default:"./keys"`
|
|
PrivKeyFile string `env:"JWT_PRIV_KEY_FILE" default:"jwt.key"`
|
|
PubKeyFile string `env:"JWT_PUB_KEY_FILE" default:"jwt.key.pub"`
|
|
KeyBits int `env:"JWT_KEY_BITS" default:"2048"`
|
|
}
|