Default configuration
()
| 2 | |
| 3 | // Default configuration |
| 4 | func NewDefaultConfiguration() *Config { |
| 5 | return &Config{ |
| 6 | Database: DatabaseConfig{ |
| 7 | Path: "./tinyauth.db", |
| 8 | }, |
| 9 | Analytics: AnalyticsConfig{ |
| 10 | Enabled: true, |
| 11 | }, |
| 12 | Resources: ResourcesConfig{ |
| 13 | Enabled: true, |
| 14 | Path: "./resources", |
| 15 | }, |
| 16 | Server: ServerConfig{ |
| 17 | Port: 3000, |
| 18 | Address: "0.0.0.0", |
| 19 | }, |
| 20 | Auth: AuthConfig{ |
| 21 | SessionExpiry: 86400, // 1 day |
| 22 | SessionMaxLifetime: 0, // disabled |
| 23 | LoginTimeout: 300, // 5 minutes |
| 24 | LoginMaxRetries: 3, |
| 25 | }, |
| 26 | UI: UIConfig{ |
| 27 | Title: "Tinyauth", |
| 28 | ForgotPasswordMessage: "You can change your password by changing the configuration.", |
| 29 | BackgroundImage: "/background.jpg", |
| 30 | WarningsEnabled: true, |
| 31 | }, |
| 32 | Ldap: LdapConfig{ |
| 33 | Insecure: false, |
| 34 | SearchFilter: "(uid=%s)", |
| 35 | GroupCacheTTL: 900, // 15 minutes |
| 36 | }, |
| 37 | Log: LogConfig{ |
| 38 | Level: "info", |
| 39 | Json: false, |
| 40 | Streams: LogStreams{ |
| 41 | HTTP: LogStreamConfig{ |
| 42 | Enabled: true, |
| 43 | Level: "", |
| 44 | }, |
| 45 | App: LogStreamConfig{ |
| 46 | Enabled: true, |
| 47 | Level: "", |
| 48 | }, |
| 49 | Audit: LogStreamConfig{ |
| 50 | Enabled: false, |
| 51 | Level: "", |
| 52 | }, |
| 53 | }, |
| 54 | }, |
| 55 | OIDC: OIDCConfig{ |
| 56 | PrivateKeyPath: "./tinyauth_oidc_key", |
| 57 | PublicKeyPath: "./tinyauth_oidc_key.pub", |
| 58 | }, |
| 59 | Experimental: ExperimentalConfig{ |
| 60 | ConfigFile: "", |
| 61 | }, |
no outgoing calls
no test coverage detected