Skip to content

Instantly share code, notes, and snippets.

View Appla's full-sized avatar
🎯
Focusing

Appla Appla

🎯
Focusing
View GitHub Profile
@Appla
Appla / access.lua
Created July 19, 2017 07:33 — forked from mariocesar/access.lua
Nginx Lua script redis based for Basic user authentication
function password_encode(password)
local bcrypt = require 'bcrypt'
return bcrypt.digest(password, 12)
end
function check_password(password, encoded_password)
local bcrypt = require 'bcrypt'
return bcrypt.verify(password, encoded_password)
end