ulist
ulist copied to clipboard
How to setup authentication
Hi Looks like this could be just the tool...
Trying to work out the authentication please
So you can use the SQLite DB as the authentication source
This is obviously the func the readers the users from the DB sqlite.Authenticate
So bcrypt is the hash for the password if I manually add a user....
name text primary key,
scheme text not null,
hash blob not null
https://unix.stackexchange.com/questions/307994/compute-bcrypt-hash-from-command-line
htpasswd -bnBC 10 "" YOUR_PASSWORD | tr -d ':\n'
INSERT INTO users (name,scheme,hash) VALUES("[email protected]","bcrypt","the hash");
Nice touch of thinking about fail2ban integration too
log.Printf(" web: authentication failed from client %s with error: %v", ExtractIP(ctx.r), err) // fail2ban can match this pattern