Support clock mocking.

This addresses #15.
This commit is contained in:
2018-12-06 08:07:27 -08:00
committed by Kyle Isom
parent bbc82ff8de
commit 9e0979e07f
3 changed files with 15 additions and 2 deletions

View File

@@ -11,9 +11,12 @@ import (
"net/url"
"strconv"
"strings"
"time"
"github.com/benbjohnson/clock"
)
var time clock.Clock
// TOTP represents an RFC 6238 Time-based One-Time Password instance.
type TOTP struct {
*OATH