globocom/gandalf — pull request #78 by rochacon (2013-04-18 06:59:19+00:00)
Title: List user's keys

Hi. I couldn't sleep so I thought I should be doing something useful. :smile:

This branch tries to add a new API handler to list a user keys (as requested in #9). Here are some things to consider:

- Currently the keys listed are those retrieved from the DB, is this good enough? Any need to check the `authorized_keys` file for listing?
- The URL that I chose was `/user/:username/keys`, is that a good one?
- Still needs to be properly documented

Here is an example of a response:
```
curl -i 127.0.0.1:8000/user/rochacon/keys
HTTP/1.1 200 OK
Date: Thu, 18 Apr 2013 06:58:39 GMT
Transfer-Encoding: chunked
Content-Type: text/plain; charset=utf-8

{"gandalf":"ssh-rsa gandalf is@awesome","golang":"ssh-rsa golang rocks@globocom"}
```