Permalink
Browse files

README added

  • Loading branch information...
1 parent 0653da8 commit b1b77e38840a730201f280e5a52e71d47ae70e87 @dzhus committed Feb 19, 2012
Showing with 50 additions and 0 deletions.
  1. +50 −0 README.org
View
50 README.org
@@ -0,0 +1,50 @@
+* Overview
+ This tool provides command-line interface to Snap AuthManager to
+ create, view and delete users in database. Currently only JsonFile
+ backend is supported.
+
+ Passwords for new users are provided in plain text. By default the
+ database resides in current directory in `users.json` file. Note
+ that if database file doesn't exist, it will be created from
+ scratch. A different db may be specified using `-j` flag.
+
+
+** Basic operations
+ Type `./snap-auth-cli --help` to get usage help.
+
+ Create a user:
+
+ : ./snap-auth-cli --create -u TwasBrillig -p SlithyToves1855
+
+ Read the user from DB:
+
+ : ./snap-auth-cli --read -u TwasBrillig
+ : {
+ : "meta": {},
+ : "suspended_at": null,
+ : "pw": "sha256|12|izRmgu++a+Hw1V48gQtiDw==|FNo/Os+Z+r2QsxXTqRyV61LDPPEibMC9U3Pbp2D/ujU=",
+ : "activated_at": null,
+ : "current_ip": null,
+ : "locked_until": null,
+ : "updated_at": "2012-02-19T22:15:47.911Z",
+ : "login_count": 0,
+ : "current_login_at": null,
+ : "login": "TwasBrillig",
+ : "remember_token": null,
+ : "failed_login_count": 0,
+ : "last_ip": null,
+ : "last_login_at": null,
+ : "uid": "1",
+ : "created_at": null
+ : }
+
+ Work on different database:
+
+ : ./snap-auth-cli -j back.json --create -u MimsyBorogove -p 0utgr@b3d
+
+ The tool provides interface to delete users, but JsonFile backend
+ in Snap doesn't support the operation yet.
+
+* To do
+** TODO More fields
+ Support setting AuthUser's userMeta, userRoles and other fields.

0 comments on commit b1b77e3

Please sign in to comment.