Giter Site home page Giter Site logo

couchdb-selfservice's Introduction

CouchDB SelfService

This is a simple CouchDB external process written in Python that processes the URL http://localhost:5984/_register?username=xxx&passwd=YYY or an POST to the same URL from a HTML form contain fields with the names username and password It applies some simple validation to the username and password. It then creates a new CouchDB user in the standard _users database and creates the user a new database by replicating from a template database. Security is set on the new database so that it can be admin'ed by the admin and read only by the new user

Installation

  1. Ensure Python 2.x is installed and couchdb-python 0.8
  2. Edit the file register.py and change the admin username and password to those of your couch database
  3. Create a database called template_db that will be used as a template database for each user. If you call this database something else then edit the appropriate line in register.py
  4. Create a directory and copy the three python files into it.
  5. Copy the selfservice.ini file into the directory //etc/couchdb/local.d/
  6. Edit the selfservice.ini file so that it correctly refers to your python executable and to the location of register.py
  7. Restart CouchDB

You should now be able to create an account by running the command: curl -v "http://localhost:5984/template_db/_register?username=firstuser&passwd=password"

Don't forget that if you change anything in the python code you'll need to restart the CouchDB server for the change to take effect.

To Do

There should be a simple example template database that contains a login form and Register button

couchdb-selfservice's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.