From 9b8aec65491deb16d8d1943cb17f3f7722dbacdc Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Thu, 8 Dec 2016 13:47:13 +0000 Subject: [PATCH] Add SQL functions for hotp/totp/yubikey security --- sql/funcs.go | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/sql/funcs.go b/sql/funcs.go index def36d74..7f398d5b 100644 --- a/sql/funcs.go +++ b/sql/funcs.go @@ -175,6 +175,26 @@ var funcs = map[string]map[int]bool{ 1: true, }, + // HOTP implementation + + "hotp.compare": { + 2: true, + }, + + "hotp.generate": { + 1: true, + }, + + // TOTP implementation + + "totp.compare": { + 2: true, + }, + + "totp.generate": { + 1: true, + }, + // Bcrypt implementation "bcrypt.compare": { @@ -204,4 +224,23 @@ var funcs = map[string]map[int]bool{ "pbkdf2.generate": { 1: true, }, + + // Yubikey implementation + + "yubikey.id": { + 1: true, + }, + + "yubikey.ctr": { + 1: true, + }, + + "yubikey.use": { + 1: true, + }, + + "yubikey.verify": { + 2: true, // yubikey.verify(AUTHSERV, $otp) + 3: true, // yubikey.verify(CLIENTID, SECRET, $otp) + }, }