feat: Implement RSA key generation and initialization for JWT authentication
This commit is contained in:
@@ -5,6 +5,9 @@ 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:"false"`
|
||||
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"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user