emaadmanzoor/igor-cli — pull request #2 by emaadmanzoor (2014-06-24 21:10:03+00:00)
Title: Authentication operations

Adds the following operations:

* `igor auth login`: Logs in and stores the username and token in `~/.netrc`
* `igor auth logout`: Clears the stored credentials in `~/.netrc`
* `igor auth whoami`: Displays the currently logged-in username
* `igor auth token`: Displays the API token for the currently logged-in user

The hierarchy of commands works as follows:

1. The `igor` command populates the `config` object with the API server, username and token if available.
2. The `login` and `logout` subcommands write and delete `~/.netrc`, and update the `config` object.
3. The `whoami` and `token` subcommands read the required data from the `config` object.