Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Simple helpers for writing Mxit apps with Django

Project Description

Middleware for writing Mxit apps with Django.

MIDDLEWARE_CLASSES = (
    ...
    'mxit.middleware.RemoteUserMiddleware',
    ...
)


AUTHENTICATION_BACKENDS = (
    ...
    'django.contrib.auth.backends.RemoteUserBackend',
    ...
)

Hit it with the correct headers and you’ll be authenticated immediately:

$ curl -XGET 'http://localhost:8000/' \
    -H 'X-Device-User-Agent: user-agent' \
    -H 'X-Mxit-CONTACT: contact' \
    -H 'X-Mxit-USERID-R: userid-r' \
    -H 'X-Mxit-NICK: nick' \
    -H 'X-Mxit-LOCATION: za,south africa,,,ct,cape town,,,,' \
    -H 'X-Mxit-PROFILE: en,za,01-01-2013,,,' \
    -H 'X-Mxit-USER-INPUT: <b>foo</b>' \

{
  "username": "userid-r",
  "mxit": {
    "MXIT_NICK": "nick",
    "MXIT_PROFILE": {
      "gender": "",
      "date_of_birth": "01-01-2013",
      "tariff_plan": "",
      "country_code": "za",
      "language_code": "en"
    },
    "DEVICE_USER_AGENT": "user-agent",
    "MXIT_CONTACT": "contact",
    "MXIT_LOCATION": {
      "city": "cape town",
      "cell_id": "",
      "network_operator_id": "",
      "subdivision_code": "",
      "client_features_bitset": "",
      "country_code": "za",
      "subdivision_name": "",
      "country_name": "south africa",
      "city_code": "ct"
    },
    "MXIT_USER_INPUT": "<b>foo</b>",
    "MXIT_USERID_R": "userid-r"
  }
}

Release History

This version
History Node

0.0.1

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
django-mxit-0.0.1.tar.gz
(2.7 kB) Copy SHA256 Hash SHA256
Source None Sep 12, 2013

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting