update README.md

This commit is contained in:
AJ ONeal 2015-10-07 13:54:55 -07:00
parent 9823974312
commit 574e56276b
1 changed files with 13 additions and 4 deletions

View File

@ -44,10 +44,19 @@ authenticator.verifyToken(formattedKey, '000 000');
### 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
### `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
-------