Unified · Split
| @@ -12,17 +12,27 @@ · 11 unmodified lines | ||
| 12 | 12 | -- |
| 13 | 13 | -- |
| 14 | 14 | |
| 15 | +-- A list of password protected repositories along with the users who can access them. | |
| 15 | 16 | local protected_repos = { |
| 16 | 17 | glouglou = { laurent = true, jason = true }, |
| 17 | 18 | qt = { jason = true, bob = true } |
| 18 | 19 | } |
| 19 | 20 | |
| 21 | +-- Please note that, in production, you'll want to replace this simple lookup | |
| 22 | +-- table with either a table of salted and hashed passwords (using something | |
| 23 | +-- smart like scrypt), or replace this table lookup with an external support, | |
| 24 | +-- such as consulting your system's pam / shadow system, or an external | |
| 25 | +-- database, or an external validating web service. For testing, or for | |
| 26 | +-- extremely low-security usage, you may be able, however, to get away with | |
| 27 | +-- compromising on hardcoding the passwords in cleartext, as we have done here. | |
| 20 | 28 | local users = { |
| 21 | 29 | jason = "secretpassword", |
| 22 | 30 | laurent = "s3cr3t", |
| 23 | 31 | bob = "ilikelua" |
| 24 | 32 | } |
| 25 | 33 | |
| 34 | +-- All cookies will be authenticated based on this secret. Make it something | |
| 35 | +-- totally random and impossible to guess. It should be large. | |
| 26 | 36 | local secret = "BE SURE TO CUSTOMIZE THIS STRING TO SOMETHING BIG AND RANDOM" |
| 27 | 37 | |
| 28 | 38 | |