Skip to content

Latest commit

 

History

History
64 lines (43 loc) · 1.48 KB

README.md

File metadata and controls

64 lines (43 loc) · 1.48 KB

authinator

This is a simple authentication server which stores users and issues tokens, it can either be used standalone or be embedded into an existing service.

overview

  • Uses scrypt for password hashing
  • Simple RESTish interface (see below)
  • Issues JWT tokens
  • No Sessions or cookies

REST API

TODO

Register

curl -v -H "Content-Type: application/json; charset=UTF-8" -X POST \
  -d '{"login":"mememe","email":"me@example.com","password":"mepass"}' http://localhost:9090/users

Login

curl -v --data "login=mememe&password=mepass" http://localhost:9090/auth/sign_in

Update current user

curl -v -H "Content-Type: application/json; charset=UTF-8" \
  -H "Authorization: Bearer AS_ABOVE" \
  -X PUT -d '{"name":"Me Me"}' http://localhost:9090/users

Get current User

curl -v -H "Content-Type: application/json; charset=UTF-8" \
  -H "Authorization: Bearer AS_ABOVE" \
  -X GET http://localhost:9090/users

dependencies

  • A data store, at the moment it supports RethinkDB with more to come.

Features

  • Stores users
  • Authenticates users
  • Supports RethinkDB as a datastore
  • Support for scopes and permission checks based on them
  • Email activation of accounts
  • Web interface

references

License

This project is released under BSD 3-clause license. Copyright 2016, Mark Wolfe .