add: login & token validation tapi belum connect ke DB
This commit is contained in:
@@ -26,6 +26,21 @@ type Config struct {
|
||||
CredentialsPath string `mapstructure:"credentials_path"`
|
||||
} `mapstructure:"google"`
|
||||
|
||||
Auth struct {
|
||||
JWTSecret string `mapstructure:"jwt_secret"`
|
||||
AccessTokenExpiry int `mapstructure:"access_token_expiry"` // in minutes
|
||||
RefreshTokenExpiry int `mapstructure:"refresh_token_expiry"` // in hours
|
||||
EnableDatabaseAuth bool `mapstructure:"enable_database_auth"`
|
||||
} `mapstructure:"auth"`
|
||||
|
||||
Database struct {
|
||||
Host string `mapstructure:"host"`
|
||||
Port int `mapstructure:"port"`
|
||||
User string `mapstructure:"user"`
|
||||
Password string `mapstructure:"password"`
|
||||
Name string `mapstructure:"name"`
|
||||
} `mapstructure:"database"`
|
||||
|
||||
AllowedOrigins []string `mapstructure:"allowed_origins"`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user