{"id":21189247,"url":"https://github.com/uptick/django-xauth","last_synced_at":"2025-08-04T17:39:17.109Z","repository":{"id":57418873,"uuid":"60740997","full_name":"uptick/django-xauth","owner":"uptick","description":"A simple Django application for AJAX authorisation.","archived":false,"fork":false,"pushed_at":"2018-03-23T06:25:19.000Z","size":12,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-07T17:12:35.747Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uptick.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-09T00:55:25.000Z","updated_at":"2018-11-01T19:15:07.000Z","dependencies_parsed_at":"2022-09-13T14:01:39.319Z","dependency_job_id":null,"html_url":"https://github.com/uptick/django-xauth","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uptick%2Fdjango-xauth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uptick%2Fdjango-xauth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uptick%2Fdjango-xauth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uptick%2Fdjango-xauth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uptick","download_url":"https://codeload.github.com/uptick/django-xauth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252922342,"owners_count":21825639,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-20T18:51:05.400Z","updated_at":"2025-05-07T17:12:40.971Z","avatar_url":"https://github.com/uptick.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# django-xauth\n\n[![PyPI version](https://badge.fury.io/py/django-ajax-auth.svg)](https://badge.fury.io/py/django-ajax-auth)\n\nSome simple AJAX authorisation endpoints for Django.\n\n## Why?\n\nI wanted a package to integrate AJAX authorisation with Django's\nstandard authorisation views. When a request is made via AJAX it\nshould be handled as such, and when a standard request is made the\nlogin form should be rendered.\n\n\n## Installation\n\n`pip` is the easiest way to get the package:\n\n```python\npip install django-ajax-auth\n```\n\nAdd the package to your Django settings file:\n\n```python\nINSTALLED_APPS = [\n    'xauth',\n    ...\n]\n```\n\nReplace the standard authorisation URLs in your URL configuration:\n\n```python\nurlpatterns = [\n    url(r'^', include('xauth.login_ajax_urls'))\n]\n```\n\n\n## Usage\n\nNow you can either perform the usual non-AJAX GET and POST to login\nas you would normally, or POST using `application/json` encoding to\nlogin over AJAX.\n\n```javascript\nimport $ from 'jquery'\n\n$.ajax({\n  url: '/login',\n  method: 'POST',\n  contentType: 'application/json',\n  data: {\n    username: 'harry',\n    password: 'henderson123'\n  }\n})\n```\n\nSometimes you may wish to only allow AJAX logins, in which case set\n`XAUTH_AJAX` to `True` in your settings file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuptick%2Fdjango-xauth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuptick%2Fdjango-xauth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuptick%2Fdjango-xauth/lists"}