Commit Graph

49 Commits

Author SHA1 Message Date
b3d8c2bc50 Update encryption example to distinguish input
The example for how to encrypt a gauth.csv file using openssl implicitly assumes
the input and output are different files. But if you run that command while already
in the output directory, they will be the same path, and it appears openssl may
clobber the output.

To avert this, explicitly indicate in the example that the input is in the home
directory, and the output is elsewhere. The actual paths do not matter, this
is just to keep the example safe.
2021-07-30 13:02:20 -04:00
f5a1f722c0 Proposal: Extend configuration file format to support options.
This change is a follow-up to the discussion on , which proposes a
backward-compatible extension to the existing config file format to allow the
user to include otpauth URLs in addition to the standard format.

This is WIP, not ready to merge; it needs tests and a better story for the
progress indicator.
2021-03-11 07:15:38 -05:00
509311a279 Update build status badge. ()
Since the CI build is now on GitHub actions rather than Travis, point to the
Actions badge image instead.
2021-01-31 11:22:02 -08:00
ba51841548 GitHub workflows, README: rename master to main v1.1 2021-01-28 22:03:07 -05:00
2ccd802aa3 add LICENSE 2021-01-28 22:01:59 -05:00
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
457efa2520 Override staticcheck version for older Go releases. 2021-01-27 12:28:22 -08:00
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
c57414b83b Fix padding removal when decrypting a config file. ()
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
9083b3c311 Merge pull request from creachadair/modpath
Update otp module path to github.
2019-06-10 20:54:09 +02:00
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
f7ae5c4da3 Merge pull request from creachadair/indirect
Consolidate and simplify the generation of codes.
2019-06-04 18:12:47 +02:00
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
c217b384f0 Merge pull request from creachadair/formatting
Clean up output formatting code.
2019-06-04 05:48:38 +02:00
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
61ada0495b Merge pull request from creachadair/librify
Separate OTP generation into a library
2019-06-02 14:29:57 +02:00
e30055f675 Add recent versions of Go to the .travis.yml. 2019-06-01 18:07:35 -07:00
0d0c6c886e Add go.mod and go.sum files to support Go modules. 2019-06-01 18:07:27 -07:00
bf81136148 Add basic unit tests for the gauth package. 2019-06-01 18:07:27 -07:00
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
e16e5ca533 Better aligment () 2019-06-02 00:03:23 +02:00
64a70580db Adding windows support () 2019-06-02 00:02:45 +02:00
b790c569ab Update README.md ()
Tested Bittrex and Poloniex.
v1.0
2018-01-10 00:59:40 -08:00
a2c540ca03 README.md: add Okta
Reported by E-mail by Bryan Baldwin.
2016-06-11 17:23:17 -04:00
65ebfe1593 newline after terminal.ReadPassword
Closes issue .
2015-12-07 21:21:31 +00:00
4a613d0cf2 Merge pull request from pcarrier/travis_10_to_15
.travis.yml: test all go releases
2015-12-03 10:35:23 -08:00
f9b7c97790 .travis.yml: use containers 2015-12-03 18:33:32 +00:00
836cbf8a9e .travis.yml: test all go releases 2015-12-03 18:30:41 +00:00
a5285a1f82 Merge pull request from pcarrier/issues/2
fix encryption
2015-12-03 10:28:27 -08:00
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 .
2015-12-03 18:21:57 +00:00
5aec87c162 README.md: sort services 2015-10-29 12:30:44 -07:00
4f1ac28963 Merge pull request from solomon56/master
Added PKGBUILD for AUR on Archlinux
2014-12-15 23:46:24 -08:00
b6f80c6c62 Added PKGBUILD for AUR on Archlinux 2014-10-16 22:16:21 -07:00
637db4f567 README.md: add build status 2014-02-26 20:15:38 -08:00
bc0fc1991e fix for travis complaint 2014-02-26 20:12:10 -08:00
2bab16649c add .travis.yml 2014-02-26 20:10:06 -08:00
88535c8fbe support for encryption 2013-11-21 19:17:19 -08:00
5d5993dd8a README: compatibility list 2013-11-20 01:47:07 -08:00
9821a5e692 README.md cleanup, time to sleep 2013-11-14 15:28:16 -08:00
c3407fc375 justify myself in README.md 2013-11-14 03:18:38 -08:00
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
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
6b23ae7ae9 Reflect current status in README.md 2013-11-14 01:43:12 -08:00
0df57e2c2e gauth.go: header, progress bar 2013-11-14 01:17:19 -08:00
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
6a66fc3533 README.md: cover android 2013-04-24 04:00:41 +02:00
f5d85b101f Access-Control-Allow-Origin: * 2013-04-24 03:31:09 +02:00
9bde217a0f add README 2013-04-24 01:41:21 +02:00
5931756ce5 initial release 2013-04-24 01:32:34 +02:00