Skip to content

shreddd/django-janrain

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

django-janrain

Janrain integration into Django using built-in django.contrib.auth package. It creates a django user using django.contrib.auth.models.User on first login and retrieves that User object on future logins.

This is a fork of the very useful django-janrain app (https://github.com/spuriousdata/django-janrain), but I decided to add built-in templates and models so that it works out of the box.

In practice, you should consider tweaking it to meet your specific user registration needs.

Installation

  • Place the janrain directory in your project directory

  • Add a url entry in urls.py:

    urlpatterns += patterns('',
            (r'^janrain/', include('janrain.urls')),
    )
    
  • Add janrain to your INSTALLED_APPS in settings.py:

    INSTALLED_APPS = (
            'django.contrib.admin',
            'django.contrib.auth',
            'django.contrib.contenttypes',
            'django.contrib.sessions',
            'janrain',
    )
    
  • Add janrain.backends.JanrainBackend to AUTHENTICATION_BACKENDS in settings.py:

    # put janrain.backends.JanrainBackend first
    AUTHENTICATION_BACKENDS = (
            'janrain.backends.JanrainBackend',
            'django.contrib.auth.backends.ModelBackend',
    )
    
  • Add your janrain api key to settings.py:

    JANRAIN_RPX_API_KEY = "0123456789abcdef0123456789abcdef0123456789abcdef"
    
  • Add your janrain domain to settings.py:

    JANRAIN_DOMAIN = "yoursite.rpxnow.com"
    

Usage

  • Visit the login page at /janrain/login/ to login
  • Visit /janrain/logout/ to log out.
  • You will probably need to tweak the code to meet your needs, but this should get you started.

About

Janrain integration for django

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%