add: login & token validation tapi belum connect ke DB

This commit is contained in:
mario
2025-05-05 11:50:36 +07:00
parent 297c9a6a01
commit 6c9ab574ce
16 changed files with 1009 additions and 41 deletions

View File

@@ -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"`
}