defunkt / gist

Potentially the best command line gister.
http://defunkt.io/gist/
MIT License
3.8k stars 339 forks source link

Use the OS keyring to store the token #212

Open dLobatog opened 9 years ago

dLobatog commented 9 years ago

Having the access token as a plaintext file is a bit of a risk I'd like to avoid, but I can't. I think using Seahorse or OSX keychains would be a better default for supported OSs.

https://github.com/jheiss/keyring provides an interface to these keyrings we could use to store the tokens in a more secure manner. Would this be a patch you'd accept if I code it up?

ConradIrwin commented 9 years ago

Hey @eLobato, I'd love to. Two things to bear in mind while working on this:

  1. Preserve backward compatibility for people with the existing setup.
  2. We publish gist as a standalone ruby script in homebrew, so we can't load any dependencies at runtime. I.e. it's almost certainly easier to inline the necessary bits of code than to depend on the library.