bitpay / node-bitpay-client

A Node.js module and command line client for interacting with BitPay's Cryptographically Secure API
102 stars 95 forks source link

Added feature to approve client identity with email, password and two-factor code with command ′keyapprove′ #34

Closed braydonf closed 10 years ago

braydonf commented 10 years ago

Added feature to approve client identity with email, password and two-factor code with command ′keyapprove′, and added various help prompts to commands, such as asking for encryption password ( with typo check ) when generating a key, ′keygen′, and asking for the decryption password on bad decryption errors ( w/ 3 attempts ) for commands ′keyrevoke′ and ′who′. Will also ask for email address, password and two-factor code when requesting a client identity, using command ′keyapprove′ to be approved if the command args haven't been used. Added notices to commands ′login′, ′logout′ and ′whoami′ to use ′keyapprove′, ′keyrevoke′ and ′who′ instead.

tacticalchihuahua commented 10 years ago

@braydonf thanks for the additions, but I am a little hesitant to merge without a compelling reason to change the command nomenclature. I would like to avoid as much thrash as possible.

braydonf commented 10 years ago

Okay, I think we just need to have an automatic keygen on command login, and believe the nomenclature will make sense, so login will generate a key if one isn't already available. The whoami command we may just be able to alias with who, later, for clarity of reading.

braydonf commented 10 years ago

@gordonwritescode Changed this PR to have the original nomenclature

tacticalchihuahua commented 10 years ago

Okay thanks. Will review shortly. Regarding the 'whoami' command: this was chosen to reflect the standard *nix command that returns the current user.

braydonf commented 10 years ago

Consistency with that would be good.

tacticalchihuahua commented 10 years ago

okay cool. got another one for you. i'd like to keep the bin/bitpay.js as thin as possible. as such, i'd like to see the BitPayUtils pulled out into it's own module. makes sense to me to see this at lib/cli-utils.js or simliar.

braydonf commented 10 years ago

Will hold off until later...