Metadata-Version: 1.1
Name: django-ajax-auth
Version: 0.1.1
Summary: A simple Django application for AJAX authorisation.
Home-page: https://github.com/uptick/django-xauth
Author: Uptick
Author-email: dev@uptickhq.com
License: BSD
Description: # django-xauth
        
        [![PyPI version](https://badge.fury.io/py/django-ajax-auth.svg)](https://badge.fury.io/py/django-ajax-auth)
        
        Some simple AJAX authorisation endpoints for Django.
        
        ## Why?
        
        I wanted a package to integrate AJAX authorisation with Django's
        standard authorisation views. When a request is made via AJAX it
        should be handled as such, and when a standard request is made the
        login form should be rendered.
        
        
        ## Installation
        
        `pip` is the easiest way to get the package:
        
        ```python
        pip install django-ajax-auth
        ```
        
        Add the package to your Django settings file:
        
        ```python
        INSTALLED_APPS = [
            'xauth',
            ...
        ]
        ```
        
        Replace the standard authorisation URLs in your URL configuration:
        
        ```python
        urlpatterns = [
            url(r'^', include('xauth.login_ajax_urls'))
        ]
        ```
        
        
        ## Usage
        
        Now you can either perform the usual non-AJAX GET and POST to login
        as you would normally, or POST using `application/json` encoding to
        login over AJAX.
        
        ```javascript
        import $ from 'jquery'
        
        $.ajax({
          url: '/login',
          method: 'POST',
          contentType: 'application/json',
          data: {
            username: 'harry',
            password: 'henderson123'
          }
        })
        ```
        
        Sometimes you may wish to only allow AJAX logins, in which case set
        `XAUTH_AJAX` to `True` in your settings file.
        
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Django
Classifier: Framework :: Django :: 1.7
Classifier: Framework :: Django :: 1.8
Classifier: Framework :: Django :: 2.0
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
