46 Commits

Author SHA1 Message Date
Pierre Carrier
ba51841548 GitHub workflows, README: rename master to main v1.1 2021-01-28 22:03:07 -05:00
Pierre Carrier
2ccd802aa3 add LICENSE 2021-01-28 22:01:59 -05:00
M. J. Fromberger
65eff71872 Fix incorrect example input in the README file.
The "Google" example code used invalid base-32 characters ("8" and "9") and
thus generated errors when decoding the keys.
2021-01-28 20:23:17 -05:00
M. J. Fromberger
457efa2520 Override staticcheck version for older Go releases. 2021-01-27 12:28:22 -08:00
M. J. Fromberger
8e211fc2dd Convert CI from Travis to GitHub Actions.
The performance of GitHub Actions is faster and more consistent than the free
tier of Travis CI. Build, lint, tests, and staticcheck for the same versions of
Go using Actions instead.
2020-10-29 16:05:23 -04:00
M. J. Fromberger
c57414b83b
Fix padding removal when decrypting a config file. (#36)
OpenSSL uses PKCS#5 padding, and the decryption code was not removing it
correctly. In some cases, this causes the last line of the decrypted config to
be mangled and produces invalid results.

To support this:

- Move config loading to gauth.LoadConfigFile.
- Inject a hook to read the user's password.
- Add unit tests that decryption doesn't corrupt the result.
- Update module dependencies.
- Update Go versions in CI, and fix some config-check warnings.
2020-10-26 18:42:15 -07:00
Pierre Carrier
9083b3c311
Merge pull request #30 from creachadair/modpath
Update otp module path to github.
2019-06-10 20:54:09 +02:00
M. J. Fromberger
02ea9924ea Update otp module path to github.
No functional changes here; I'm just moving the source repository from
bitbucket to github and need to update the import path accordingly.
2019-06-10 10:12:34 -07:00
Pierre Carrier
f7ae5c4da3
Merge pull request #29 from creachadair/indirect
Consolidate and simplify the generation of codes.
2019-06-04 18:12:47 +02:00
M. J. Fromberger
9d95eb95fd Consolidate and simplify the generation of codes.
Rework gauth.Code as gauth.Codes, which returns the previous, current, and next
strings in one step. Remove authCodeOrDie, since there is now only one decode
step to check.

The implementation now uses the bitbucket.org/creachadair/otp package, which
makes the code simpler and subsumes normalizeSecret.
2019-06-03 22:20:08 -07:00
Pierre Carrier
c217b384f0
Merge pull request #28 from creachadair/formatting
Clean up output formatting code.
2019-06-04 05:48:38 +02:00
M. J. Fromberger
3e14d15f54 Clean up output formatting code.
Instead of manually computing column sizes, use the tabwriter library package.
The output is the same, but requires less fiddly space manipulation.
2019-06-02 08:23:28 -07:00
Pierre Carrier
61ada0495b
Merge pull request #27 from creachadair/librify
Separate OTP generation into a library
2019-06-02 14:29:57 +02:00
M. J. Fromberger
e30055f675 Add recent versions of Go to the .travis.yml. 2019-06-01 18:07:35 -07:00
M. J. Fromberger
0d0c6c886e Add go.mod and go.sum files to support Go modules. 2019-06-01 18:07:27 -07:00
M. J. Fromberger
bf81136148 Add basic unit tests for the gauth package. 2019-06-01 18:07:27 -07:00
M. J. Fromberger
87aa5234c1 Separate OTP generation into a library.
No functional changes are intended; the main package now imports the library
and uses it, but the implementation is unchanged.

Specific highlights:

- Change the names of the functions to avert stutter following the advice of
  Effective Go: https://golang.org/doc/effective_go.html#package-names

- Reorganize the helpers in main so control flow is easier to follow.

- Add documentation comments.
2019-06-01 18:07:27 -07:00
Carlos Tadeu Panato Junior
e16e5ca533 Better aligment (#17) 2019-06-02 00:03:23 +02:00
Kevin E Rad
64a70580db Adding windows support (#22) 2019-06-02 00:02:45 +02:00
Ferry Schuller
b790c569ab Update README.md (#12)
Tested Bittrex and Poloniex.
v1.0
2018-01-10 00:59:40 -08:00
Pierre Carrier
a2c540ca03 README.md: add Okta
Reported by E-mail by Bryan Baldwin.
2016-06-11 17:23:17 -04:00
Pierre Carrier
65ebfe1593 newline after terminal.ReadPassword
Closes issue #5.
2015-12-07 21:21:31 +00:00
Pierre Carrier
4a613d0cf2 Merge pull request #4 from pcarrier/travis_10_to_15
.travis.yml: test all go releases
2015-12-03 10:35:23 -08:00
Pierre Carrier
f9b7c97790 .travis.yml: use containers 2015-12-03 18:33:32 +00:00
Pierre Carrier
836cbf8a9e .travis.yml: test all go releases 2015-12-03 18:30:41 +00:00
Pierre Carrier
a5285a1f82 Merge pull request #3 from pcarrier/issues/2
fix encryption
2015-12-03 10:28:27 -08:00
Pierre Carrier
08c36af51e fix encryption
- moving to crypto/ssh/terminal, which should also work on Windows
  and be better maintained (code.google.com is going away)
- fix support for padding

Closes #2.
2015-12-03 18:21:57 +00:00
Pierre Carrier
5aec87c162 README.md: sort services 2015-10-29 12:30:44 -07:00
Pierre Carrier
4f1ac28963 Merge pull request #1 from solomon56/master
Added PKGBUILD for AUR on Archlinux
2014-12-15 23:46:24 -08:00
Solomon
b6f80c6c62 Added PKGBUILD for AUR on Archlinux 2014-10-16 22:16:21 -07:00
Pierre Carrier
637db4f567 README.md: add build status 2014-02-26 20:15:38 -08:00
Pierre Carrier
bc0fc1991e fix for travis complaint 2014-02-26 20:12:10 -08:00
Pierre Carrier
2bab16649c add .travis.yml 2014-02-26 20:10:06 -08:00
Pierre Carrier
88535c8fbe support for encryption 2013-11-21 19:17:19 -08:00
Pierre Carrier
5d5993dd8a README: compatibility list 2013-11-20 01:47:07 -08:00
Pierre Carrier
9821a5e692 README.md cleanup, time to sleep 2013-11-14 15:28:16 -08:00
Pierre Carrier
c3407fc375 justify myself in README.md 2013-11-14 03:18:38 -08:00
Pierre Carrier
efee605b1d move to CSV
Preserves order, easier to maintain, more Unixy, less error-prone.
Sorry if you have to migrate.
2013-11-14 03:18:38 -08:00
Pierre Carrier
5bc8ff087a Support for "irregular" secret lengths
I realized whilst turning 2FA for Dropbox that they use a secret length
that's not a multiplier of 8, which breaks Go's base32 decoder.
2013-11-14 02:29:27 -08:00
Pierre Carrier
6b23ae7ae9 Reflect current status in README.md 2013-11-14 01:43:12 -08:00
Pierre Carrier
0df57e2c2e gauth.go: header, progress bar 2013-11-14 01:17:19 -08:00
Pierre Carrier
c1e9da57d1 make it a local process... HTTP is too much pain
Adapting to my new workflow, yo.
2013-11-12 06:45:56 +00:00
Pierre Carrier
6a66fc3533 README.md: cover android 2013-04-24 04:00:41 +02:00
Pierre Carrier
f5d85b101f Access-Control-Allow-Origin: * 2013-04-24 03:31:09 +02:00
Pierre Carrier
9bde217a0f add README 2013-04-24 01:41:21 +02:00
Pierre Carrier
5931756ce5 initial release 2013-04-24 01:32:34 +02:00