Skip to content

Commit 4e0aa91

Browse files
committed
Merge pull request #44 from speakeasyjs/v2
Version 2.0.0
2 parents f6cd5a1 + a035a02 commit 4e0aa91

22 files changed

+2607
-942
lines changed

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
node_modules/*
1+
# npm
2+
node_modules
3+
npm-debug.log
4+
5+
# Mac OS X
6+
.DS_Store

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
test

.travis.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
language: node_js
22
node_js:
3-
- "0.10"
3+
- "5.3"
4+
- "5.0"
5+
- "4.1"
6+
- "4.0"
47
- "0.12"
5-
- "iojs"
8+
after_script: 'istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage'

CHANGELOG.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# Change Log
2+
All notable changes to this project will be documented in this file.
3+
This project adheres to [Semantic Versioning](http://semver.org/) and the [Keep a Changelog template](https://github.com/olivierlacan/keep-a-changelog/blob/master/CHANGELOG.md).
4+
5+
## [2.0.0] - 2016-01-27
6+
7+
Speakeasy 2.0.0 is a major update based on a Speakeasy fork, [Passcode](https://github.com/mikepb/passcode), by [Michael Phan-Ba](https://github.com/mikepb), which also incorporates code from another Node.js HOTP/TOTP module, [notp](https://github.com/guyht/notp), by [Guy Halford-Thompson](https://github.com/guyht), with additional functionality and API compatibility changes made by [Mark Bao](https://github.com/markbao). Speakeasy is now also moving to its own GitHub organization.
8+
9+
Speakeasy 2.0.0 is API-compatible with Speakeasy 1.x.x, but a number of functions are renamed and deprecated for consistency. See below. Future versions of Speakeasy 2.x.x may not be API-compatible with Speakeasy 1.x.x. Deprecation notices have been added.
10+
11+
### Added
12+
13+
- Added support for SHA256 and SHA512 hashing algorithms, and general support for other hashing algorithms. Thanks, JHTWebAdmin.
14+
- Added `verify` functions from notp, adding verification window functionality which allows for the verification of tokens across a window (e.g. in HOTP, x tokens ahead, or in TOTP, x tokens ahead or behind).
15+
- Added `verifyDelta` functions which calculate a delta between a given token and where it was found within the window.
16+
- Added `verify` functions which wrap `verifyDelta` to return a boolean.
17+
- Added tests for key generator.
18+
- Added many more tests from Passcode and notp. All the above thanks to work from mikepb, guyht, and markbao.
19+
- Added `issuer`, `counter`, and `type` to Google Authenticator otpauth:// URL. Thanks, Vincent Lombard.
20+
- Added the output of a Google Authenticator–compatible otpauth:// URL to the key generator.
21+
- Added a new function, `otpuathURL()`, to output an otpauth:// URL.
22+
- Added a new demo and a guide for how to use Speakeasy to implement two-factor authentication.
23+
- Added code coverage testing with Istanbul.
24+
- Now conforms to JavaScript Semistandard code style.
25+
26+
### API Changes
27+
28+
v2.0.0 does not introduce any breaking changes, but deprecates a number of functions and parameters. Backwards compatibility is maintained for v2.0.0 but may not be maintained for future versions. While we highly recommend updating to 2.x.x, please make sure to update your `package.json` to use Speakeasy at versions `^1.0.5` if you'd like to use the 1.x.x API.
29+
30+
- `generate_key()` is now `generateSecret()`. `generate_key()` deprecated.
31+
- `generate_key_ascii()` is now `generateSecretASCII()`. `generate_key_ascii()` deprecated.
32+
- `totp()` and `hotp()` now take the `key` parameter as `secret` (`key` deprecated).
33+
- `totp()` and `hotp()` now take the `length` parameter as `digits` (`length` deprecated).
34+
- `totp()` now takes the `initial_time` parameter as `epoch` (`initial_time` deprecated).
35+
- `generateSecret()` no longer supports returning URLs to QR codes using `qr_codes` and `google_auth_qr` since passing the secret to a third party may be a security risk. Implement QR code generation on your own instead, such as by using a QR module like `qr-image` or `node-qrcode`.
36+
37+
### Changed
38+
39+
- Now uses native Node.js buffers for converting encodings.
40+
- Now uses `base32.js` Node package for base32 conversions.
41+
- Moved location of main file to `index.js`.
42+
- Moved digesting into a separate function.
43+
- Documentation now uses JSDoc.
44+
45+
46+
### Fixed
47+
48+
- Double-escape otpauth:// parameters for Google Authenticator otpauth:// URL. Thanks, cgarvey.
49+
50+
## [1.0.5] - 2016-01-23
51+
52+
### Fixed
53+
54+
- Fixed key generator random selector overflow introduced in 1.0.4. Thanks, cmaster11.
55+
56+
## [1.0.4] - 2016-01-08
57+
58+
### Changed
59+
60+
- Removed ezcrypto in favor of native Node crypto. Thanks, connor4312.
61+
- Move to a more secure key generator using `crypto.randomBytes`. Thanks, connor4312.
62+
- Allow `generate_key` to be called with no options. Thanks, PeteJodo.
63+
64+
### Fixed
65+
66+
- Fixed zero-padding bug in hotp. Thanks, haarvardw.
67+
68+
## [1.0.3] - 2013-02-05
69+
70+
### Changed
71+
72+
- Add vows to devDependencies and support `npm test` in package.json. Thanks, freewill!
73+
74+
## [1.0.2] - 2012-10-21
75+
76+
### Fixed
77+
78+
- Remove global leaks. Thanks for the fix, mashihua.
79+
80+
## [1.0.1] - 2012-09-10
81+
82+
### Fixed
83+
84+
- Fixes issue where Google Chart API was being called at a deprecated URL. Thanks for the fix, sakkaku.
85+
- Fixes issue where `generate_key`'s `symbols` option was not working, and was also causing pollution with global var. Thanks for reporting the bug, ARAtlas.
86+
87+
## [1.0.0] - 2011-11-03
88+
89+
### Added
90+
91+
- Initial release.
92+
93+
[2.0.0]: https://github.com/speakeasyjs/speakeasy/compare/v1.0.5...v2.0.0
94+
[1.0.5]: https://github.com/speakeasyjs/speakeasy/compare/v1.0.4...v1.0.5
95+
[1.0.4]: https://github.com/speakeasyjs/speakeasy/compare/v1.0.3...v1.0.4
96+
[1.0.3]: https://github.com/speakeasyjs/speakeasy/compare/v1.0.2...v1.0.3
97+
[1.0.2]: https://github.com/speakeasyjs/speakeasy/compare/v1.0.1...v1.0.2
98+
[1.0.1]: https://github.com/speakeasyjs/speakeasy/compare/v1.0.0...v1.0.1
99+
[1.0.1]: https://github.com/speakeasyjs/speakeasy/compare/v1.0.0...v1.0.1
100+
[1.0.0]: https://github.com/speakeasyjs/speakeasy/compare/3de0a0f887d5146f0e90176263e8984c20ee2478...v1.0.0

History.md

Lines changed: 0 additions & 30 deletions
This file was deleted.

LICENSE

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2012-2013 Mark Bao
3+
Copyright (c) 2012-2016 Mark Bao <mark@markbao.com>
4+
Copyright (c) 2015 Michael Phan-Ba <michael@mikepb.com>
5+
Copyright (c) 2011 Guy Halford-Thompson <guy@cach.me>
46

57
Permission is hereby granted, free of charge, to any person obtaining a copy
68
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)