update README.md

This commit is contained in:
AJ ONeal 2015-10-07 13:51:24 -07:00
parent 3b9d86fca5
commit 9823974312
1 changed files with 7 additions and 0 deletions

View File

@ -42,6 +42,13 @@ authenticator.verifyToken(formattedKey, '000 000');
// null // null
``` ```
### API
* `generateKey()` generates a 32-character (160-bit) base32 key
* `generateToken(formattedKey)` generates a 6-digit (20-bit) decimal time-based token
* `verifyToken(formattedKey, formattedToken)` validates a time-based token within a +/- 30 second (90 seconds) window
* returns `null` on failure or an object such as `{ delta: 0 }` on success
QR Code QR Code
------- -------