Last active
August 29, 2015 14:21
-
-
Save isterin/effcf227654e1ef6b76d to your computer and use it in GitHub Desktop.
CoreTechCorp Advanced Auth Verification
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.post('/verify', function(req, res) { | |
var digest = crypto.createHmac('sha1', '--- priv key----').update("---pub key---").digest(encoding="base64"); | |
if (req.body.sig_verify == digest) { | |
res.redirect('/demo/success.html') | |
} | |
else { | |
res.redirect("/demo/failure.html") | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment