Skip to content

JoeJasinski/auth_server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This module is designed to act as a Basic Auth server. Active Django Users can be authenticatd against by performing requests to whereever the auth_moulde url is mounted.

For example, performing the following request will try to authenticate a user with usernme joe and password 1234.

curl -v --user "joe:1234" http://localhost:8000/

The response will either be 200 for a successful authentication or non-200 for a failed authentication.

Middleware on the client side can be designed to make this request.

IMPORTANT: because the passwords and usernames are passed in plain text, this module should ONLY be hosted under HTTPS.

NOTES

This module requires: django>=1.4 django-rest-framework jsonfield

The demo directory contains an example django project.

INSTALLING the MODULE

  1. Install the this package python setup.py install

  2. Add the following to INSTALLED_APPS in settings.py

    'rest_framework', 'auth_server',

  3. Add the following to urls.conf

    url(r'^$', include('auth_server.urls')),

  4. Run syncdb and migrate (is south is installed)

    ./manage.py syncdb ./manage.py migrate auth_server

TESTING the MODULE

  1. Create a virtualenv and activate if desired

    virtualenv test_demo cd test_demo; . ./bin/activate

  2. Go to the demo directory

    cd auth_server/demo/

  3. Install the requirements

    pip install -r requirements.txt

  4. Run the test

    ./manage.py test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages