Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 2.0.0 #44

Merged
merged 121 commits into from
Jan 27, 2016
Merged
Show file tree
Hide file tree
Changes from 111 commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
7d7aa07
Double-escape otpauth URL paramaters passed to Google Charts API (all…
cgarvey Sep 4, 2013
459b533
ajout issuer counter et type
zzOzz Sep 12, 2014
1b955f5
correction erreur += =
zzOzz Sep 12, 2014
3f19a88
Merge branch 'master' of github.com:MCProHosting/speakeasy
Mar 30, 2015
4ce5721
- Added support for SHA256 and SHA512
May 5, 2015
db9d499
Update README to include support for algorithms
May 5, 2015
20660ea
Merge pull request #1 from mslosarek/sha256_sha512
mslosarek May 5, 2015
67c053e
Merge remote-tracking branch 'mslosarek/master'
mikepb Jun 12, 2015
17bc886
Merge remote-tracking branch 'cgarvey/master'
mikepb Jun 12, 2015
11f5f57
Merge remote-tracking branch 'zzOzz/master'
mikepb Jun 12, 2015
cd85579
Use Buffer to convert hex to bytes
mikepb Jun 12, 2015
1ebb53e
Use Buffer to handle ascii encoding
mikepb Jun 12, 2015
cc7095f
Add license to package.json
mikepb Jun 12, 2015
4fe1294
Use own base32 encoder
mikepb Jun 12, 2015
4f4314b
Move main file to index.js
mikepb Jun 12, 2015
349ddb7
Graft notp verify functions onto library
mikepb Jun 12, 2015
cd69340
Add copyrights to license
mikepb Jun 12, 2015
508332e
Revive as Passcode
mikepb Jun 13, 2015
d6a2af2
Fix verify methods not showing up in docs
mikepb Jun 13, 2015
1c5da71
Update History.md with history of passcode
mikepb Jun 13, 2015
32a0fa3
Ignore case on algorithm option
mikepb Jun 13, 2015
2aceeb4
v1.0.1
mikepb Jun 13, 2015
a83c348
Update instructions to use `npm install --save passcode`
mikepb Jun 14, 2015
5b84a6f
[Fixed] Don't repeat the secret key generating the digest.
mikepb Jun 14, 2015
bb61c95
v1.0.2
mikepb Jun 14, 2015
7f62d5a
Add .npmignore
mikepb Jun 14, 2015
a8aae5d
Merge branch 'master' of https://github.com/mikepb/passcode into mike…
markbao Dec 23, 2015
c567a5e
Merging mikepb/passcode at master into branch v2.
markbao Dec 23, 2015
30a7158
Updated README and changed names.
markbao Dec 23, 2015
859f3d4
Updated .travis.yml with new Node versions
markbao Dec 23, 2015
f93ed29
Added Travis CI badge
markbao Dec 23, 2015
5ab4d66
Added icon attribution
markbao Dec 23, 2015
69942dc
Updated badges
markbao Dec 23, 2015
4608a4d
Added demo to README and updated package.json author and package names
markbao Dec 29, 2015
9e1df2b
Minor updates to README and jsdoc
markbao Dec 29, 2015
055d802
Updated documentation link
markbao Dec 29, 2015
ca8cb58
Minor updates to README formatting
markbao Dec 29, 2015
3f0d9dc
Updated README with updated usage, buttons, and quick reference
markbao Dec 31, 2015
61e129c
[fix] Resolved some API breakage with key/secret and epoch/initial_time
markbao Dec 31, 2015
a98479d
[refactor] Moved verify to verifyDelta and added verify to check trut…
markbao Dec 31, 2015
407996b
[new] Moved over generate_key and updated documentation, moved url to…
markbao Dec 31, 2015
d58fdce
[fix] Updated tests to reflect move from url to google_auth_url
markbao Dec 31, 2015
7105f4a
[fix] Minor fixes for review comments for updated API
markbao Jan 3, 2016
03ef53b
[maint] Updated LICENSE
markbao Jan 3, 2016
fcbf999
[fix] Fixed minor documentation bugs
markbao Jan 3, 2016
d945e79
Update default window to 0
mikepb Jan 23, 2016
0126852
Merge pull request #47 from mikepb/v2
markbao Jan 23, 2016
bc6eb66
[fix] Tests - Fixed typos
markbao Jan 23, 2016
159eec0
[new] Add code coverage with Istanbul and a command for it
markbao Jan 23, 2016
bbeb9e3
[new] Add style checking with Semistandard
markbao Jan 23, 2016
2dedddc
[fix] Generate - Fixed key generation random ASCII string generator
markbao Jan 23, 2016
145573d
[fix] Generate - Use correct key format when returning Google Auth URL
markbao Jan 23, 2016
7a56b69
[fix] Generate - Fix google_auth_url default setting and override
markbao Jan 23, 2016
ae9e35d
[fix] TOTP - Make unpacking options consistent with HOTP
markbao Jan 23, 2016
cae9256
[test] TOTP - Adding test for TOTP with custom counter
markbao Jan 23, 2016
1720db5
[test] Generate - Added tests for generate and added Chai
markbao Jan 23, 2016
15ef6d0
[proj] Added Coveralls and updated Travis script
markbao Jan 23, 2016
5e4a96f
[readme] Added code coverage badge
markbao Jan 23, 2016
cca5258
[clean] Fix master merge conflict due to updated version
markbao Jan 23, 2016
a98ff49
[test] Update tests to use Chai and move passcode -> speakeasy
markbao Jan 23, 2016
4cef296
[test] Added global declaration (required for standard), fixed strict…
markbao Jan 23, 2016
461263e
[fix] Generate - Fix base32 encoding and move hex encoding to native …
markbao Jan 23, 2016
14cb7e9
[test] Update tests to test returned encodings and remove generate_ke…
markbao Jan 23, 2016
cd4e03d
[test] Restore generate_key_ascii tests
markbao Jan 23, 2016
c27c8c7
[readme] Updated README with full documentation
markbao Jan 23, 2016
1399eb8
[doc] Add google_auth_url to the GeneratedSecret typedef
markbao Jan 23, 2016
ee299b3
[doc] Updated documentation with more detail and fixed updated API
markbao Jan 23, 2016
98230f5
[doc] Updated README.md documentation
markbao Jan 23, 2016
fee1810
Merge branch 'master' of github.com:speakeasyjs/speakeasy into v2
markbao Jan 23, 2016
ec44e6b
[test] NOTP - Fix test checking for negative counter value
markbao Jan 24, 2016
361207d
[doc] Update documentation for hotp/totp.verifyDelta() and .verify() …
markbao Jan 24, 2016
7c77a04
[refactor] Move all method names to camelCase and make vocabulary con…
markbao Jan 24, 2016
57c2bb7
[fix] HOTP/TOTP - Add Speakeasy 1.x aliases for speakeasy.time() and …
markbao Jan 24, 2016
9353f68
[fix] Generate - Deprecated QR code functionality and ensured that `n…
markbao Jan 24, 2016
2058454
[fix] Generate - Generate should use base32 encoding for googleAuthURL
markbao Jan 24, 2016
f9a9059
[maint] Add deprecation notices
markbao Jan 24, 2016
b25edde
[maint] Removed History.md
markbao Jan 24, 2016
efc40ee
[fix] Fix deprecation notice syntax
markbao Jan 24, 2016
001bb63
[doc] Updated documentation with updated JSDoc
markbao Jan 24, 2016
2e80da4
[readme] Added documentation for two-factor usage
markbao Jan 24, 2016
a8c306f
[refactor] Conform to JavaScript Semistandard style
markbao Jan 24, 2016
fd6be24
[refactor] Rename googleAuthURL to otpauthURL
markbao Jan 24, 2016
271234f
[refactor] TOTP - time param is now defined in seconds, not milliseco…
markbao Jan 24, 2016
83e7c71
[readme] Fix README typos and JSDoc updates
markbao Jan 24, 2016
37d4937
[fix] Minor changes after code review
markbao Jan 24, 2016
d8196ef
[test] Generate - Move tests away from deprecated functions
markbao Jan 24, 2016
a8d62a5
[test] Generate - Add tests for deprecated generate_key[_ascii]
markbao Jan 24, 2016
f782374
[readme] Fix two-factor example userToken type
markbao Jan 24, 2016
87da5f8
[readme] Fix two-factor example code global leak
markbao Jan 24, 2016
a7230cb
[fix] Update deprecation checker conditionals
markbao Jan 24, 2016
f12bd0a
[doc] Update remaining time/initial_time/epoch doc options to specify…
markbao Jan 24, 2016
f653975
[fix] Correct parseInt defaults
markbao Jan 24, 2016
79b4888
[readme] Updated two-factor guide and added more usage examples
markbao Jan 24, 2016
cd14b0f
[maint] Added CHANGELOG.md, updated README.md copy
markbao Jan 24, 2016
aef32f4
[fix] URL - Various fixes for otpauthURL
markbao Jan 24, 2016
d4486a3
[readme] Added usage example for getting an otpauth:// URL for non-SH…
markbao Jan 24, 2016
e663e84
[readme] Small update to two-factor tutorial copy
markbao Jan 25, 2016
b7fbc2e
Use domain-specific constant-time token comparison
mikepb Jan 25, 2016
22d845a
Merge pull request #49 from mikepb/v2
markbao Jan 25, 2016
8a922e6
[test] Add tests for deprecated initial_time and length
markbao Jan 25, 2016
9aa3a7a
Fix totp.verifyDelta() returning incorrect delta
mikepb Jan 26, 2016
06cae65
Merge pull request #50 from mikepb/v2
markbao Jan 27, 2016
f40d572
[test] Moved verifyDelta tests from hotp to totp
markbao Jan 27, 2016
575b0b7
[test] TOTP - Added additional tests for testing window behavior
markbao Jan 27, 2016
9c76bdb
[readme] Usage - Added documentation for window usage
markbao Jan 27, 2016
aa37a7c
[test] Add test for checking NaN checker in verifyDelta
markbao Jan 27, 2016
f71cbb3
[readme] Minor copy updates to window usage
markbao Jan 27, 2016
6520792
[test] TOTP - Added test for negative delta using time
markbao Jan 27, 2016
f20fb4f
[change] Throw on invalid digits in verifyDelta() and add Speakeasy p…
markbao Jan 27, 2016
a99bc50
[readme] Update documentation for throws and other minor changes
markbao Jan 27, 2016
fe554c5
[change] Reversed changes to make verifyDelta throw when non-matching…
markbao Jan 27, 2016
336222e
[change] otpauthURL - Make digits and algorithm more flexible in poss…
markbao Jan 27, 2016
6fc391e
[doc] TOTP - Clarify negative behavior in verifyDelta()
markbao Jan 27, 2016
2b63468
[pkg] Update description
markbao Jan 27, 2016
bb7161b
[pkg] Update keywords
markbao Jan 27, 2016
22d0632
[change] Move console.log deprecation warnings to console.warn
markbao Jan 27, 2016
c6ac27a
[doc] Added more introductory verbiage for totp(), hotp(), _counter()
markbao Jan 27, 2016
8cc306e
[maint] Update CHANGELOG.md. We're releasing today!
markbao Jan 27, 2016
9773d0c
[readme] Add attribution to passcode and notp
markbao Jan 27, 2016
0555ac7
[readme] Updated intro copy
markbao Jan 27, 2016
a035a02
[pkg] Added bugs field to package.json
markbao Jan 27, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
node_modules/*
# npm
node_modules
npm-debug.log

# Mac OS X
.DS_Store
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
language: node_js
node_js:
- "0.10"
- "5.3"
- "5.0"
- "4.1"
- "4.0"
- "0.12"
- "iojs"
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'
99 changes: 99 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# Change Log
All notable changes to this project will be documented in this file.
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).

## [2.0.0] - 2016-

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.

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.

### Added

- Added support for SHA256 and SHA512 hashing algorithms, and general support for other hashing algorithms. Thanks, JHTWebAdmin.
- 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).
- Added `verifyDelta` functions which calculate a delta between a given token and where it was found within the window.
- Added `verify` functions which wrap `verifyDelta` to return a boolean.
- Added tests for key generator.
- Added many more tests from Passcode and notp. All the above thanks to work from mikepb, guyht, and markbao.
- Added `issuer`, `counter`, and `type` to Google Authenticator otpauth:// URL. Thanks, Vincent Lombard.
- Added the output of a Google Authenticator–compatible otpauth:// URL to the key generator.
- Added a new function, `otpuathURL()`, to output an otpauth:// URL.
- Added a new demo and a guide for how to use Speakeasy to implement two-factor authentication.
- Added code coverage testing with Istanbul.
- Now conforms to JavaScript Semistandard code style.

### API Changes

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.

- `generate_key()` is now `generateSecret()`. `generate_key()` deprecated.
- `generate_key_ascii()` is now `generateSecretASCII()`. `generate_key_ascii()` deprecated.
- `totp()` and `hotp()` now take the `key` parameter as `secret` (`key` deprecated).
- `totp()` and `hotp()` now take the `length` parameter as `digits` (`length` deprecated).
- `totp()` now takes the `initial_time` parameter as `epoch` (`initial_time` deprecated).
- `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`.

### Changed

- Now uses native Node.js buffers for converting encodings.
- Now uses `base32.js` Node package for base32 conversions.
- Moved location of main file to `index.js`.
- Moved digesting into a separate function.
- Documentation now uses JSDoc.


### Fixed

- Double-escape otpauth:// parameters for Google Authenticator otpauth:// URL. Thanks, cgarvey.

## [1.0.5] - 2016-01-23

### Fixed

- Fixed key generator random selector overflow introduced in 1.0.4. Thanks, cmaster11.

## [1.0.4] - 2016-01-08

### Changed

- Removed ezcrypto in favor of native Node crypto. Thanks, connor4312.
- Move to a more secure key generator using `crypto.randomBytes`. Thanks, connor4312.
- Allow `generate_key` to be called with no options. Thanks, PeteJodo.

### Fixed

- Fixed zero-padding bug in hotp. Thanks, haarvardw.

## [1.0.3] - 2013-02-05

### Changed

- Add vows to devDependencies and support `npm test` in package.json. Thanks, freewill!

## [1.0.2] - 2012-10-21

### Fixed

- Remove global leaks. Thanks for the fix, mashihua.

## [1.0.1] - 2012-09-10

### Fixed

- Fixes issue where Google Chart API was being called at a deprecated URL. Thanks for the fix, sakkaku.
- 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.

## [1.0.0] - 2011-11-03

### Added

- Initial release.

[1.0.5]: https://github.com/speakeasyjs/speakeasy/compare/v1.0.4...v1.0.5
[1.0.4]: https://github.com/speakeasyjs/speakeasy/compare/v1.0.3...v1.0.4
[1.0.3]: https://github.com/speakeasyjs/speakeasy/compare/v1.0.2...v1.0.3
[1.0.2]: https://github.com/speakeasyjs/speakeasy/compare/v1.0.1...v1.0.2
[1.0.1]: https://github.com/speakeasyjs/speakeasy/compare/v1.0.0...v1.0.1
[1.0.1]: https://github.com/speakeasyjs/speakeasy/compare/v1.0.0...v1.0.1
[1.0.0]: https://github.com/speakeasyjs/speakeasy/compare/3de0a0f887d5146f0e90176263e8984c20ee2478...v1.0.0
30 changes: 0 additions & 30 deletions History.md

This file was deleted.

4 changes: 3 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
The MIT License (MIT)

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

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