robconery/pg-auth(opens in a new tab)
Language: PLpgSQL
A complete authentication system built in Postgres using schemas and functions
- stars
- 120
- watchers
- 5
- forks
- 18
- open issues
- 0
- Last updated
- 07/01/2016
Language: PLpgSQL
A complete authentication system built in Postgres using schemas and functions
I'm fairly certain that the existence of this repo will cause anxiety. It's just a thought exercise - people have asked, so here it is.
This is the Postgres Authentication stuff - meaning it's a full authentication system in a box, in your DB. I flipped out one weekend and decided to see if I could do it... I could, so here it is.
Still a bit raw, but tests are passing nicely. Still need to work on a few things.
I tried to make everything as self-contained as I could. So, to install this just crack open index.js and set DB to whatever local database you want to use.
And then...
npm install
node index.js
This will execute a bulk SQL transaction against your database and will:
pgcrypto for hashing passwordsIf you want to play around, the test db is called pg_auth and I build it on the fly. You can see all the scripts in the build/src directory - these get built and dropped into build/dist. If all you want is to check stuff out just install as above and have a good time.
I like seeing what Postgres can do, and I'm not the world's best programmer so if you see some things that are interesting, have some fun.