alexaandru/elastic_guardian — pull request #2 by alexaandru (2014-02-01 18:18:28+00:00)
Title: Redesign auth

Redesigned authentication:

- implemented a file based credentials/authorization storages;
- added functions to load credentials/authorizations from either a Go type directly or from a Reader (currently can use a file for this purpose, but nothing stops a DB backend to implement Reader and thus read all the credentials from a DB instead);
- ensured that passwords are stored using one way hashing function (SHA256 currently);

Also did a tentative cleanup of the main/command file - moved initialization helpers to their own file.