Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/peopledoc/django-ticketoffice
One-shot authentication utilities for Django
https://github.com/peopledoc/django-ticketoffice
approved-public ghec-mig-migrated
Last synced: 17 days ago
JSON representation
One-shot authentication utilities for Django
- Host: GitHub
- URL: https://github.com/peopledoc/django-ticketoffice
- Owner: peopledoc
- License: other
- Created: 2013-09-27T09:27:56.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2022-07-19T10:26:59.000Z (over 2 years ago)
- Last Synced: 2024-12-17T04:31:09.732Z (17 days ago)
- Topics: approved-public, ghec-mig-migrated
- Language: Python
- Size: 137 KB
- Stars: 4
- Watchers: 17
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG
- Contributing: CONTRIBUTING.rst
- License: LICENSE
Awesome Lists containing this project
README
###################
django-ticketoffice
###################`django-ticketoffice` provides one-shot authentication (a.k.a. temporary
credentials) utilities for Django.
It lets you create and manage tickets that allow users to perform one action
on the website. As an example, Django could use it for the "password reset"
action, where users authenticate using a temporary token.*******
Example
*******Restrict some URL to guests with valid invitation tickets:
.. code:: python
from django.conf.urls import patterns, url
from django_ticketoffice.decorators import invitation_required, stamp_invitation@invitation_required(place='louvre', purpose='visit')
@stamp_invitation # Mark invitation as used right **after** view execution.
def visit_louvre(request):
ticket = request.cache['invitation'] # Set by `invitation_required`.
return 'Welcome to the Louvre museum {guest}'.format(
guest=ticket.data['first_name'])urlpatterns = patterns('', url('^louvre$', visit_louvre, name='louvre'))
Create and deliver tickets for this resource:
.. code:: python
from django.utils.timezone import now
from django_ticketoffice.models import Ticketticket = Ticket(place='louvre', purpose='visit')
ticket.set_password('I love Paris') # Encrypted in database.
ticket.expiry_datetime = now() + timedelta(days=5) # Optional.
ticket.data = {'first_name': 'Léonard'} # Optional.
ticket.save()credentials = {'uuid': ticket.uuid, 'password': 'I love Paris'}
visit_url = reverse('louvre') + '?' + urlencode(credentials)`django-ticketoffice` focuses on authentication. It does not send invitation
emails. You may check `django-mail-factory`_ about sending emails.**************
Project status
**************`django-ticketoffice` is, at the moment, a proof-of-concept: it delivers basic
features in order to create tickets and to use them in views. It works (you
can use it), but it may lack some features (ideas are welcome), and it may
change (improve) quite a bit. That said, maintainers will take care of release
notes and migrations.See also `vision`_, `roadmap`_ and `alternatives`_ to get a better overview of
project status.*********
Resources
********** Documentation: https://django-ticketoffice.readthedocs.org
* PyPI page: http://pypi.python.org/pypi/django-ticketoffice
* Code repository: https://github.com/peopledoc/django-ticketoffice
* Bugtracker: https://github.com/peopledoc/django-ticketoffice/issues
* Continuous integration: https://travis-ci.org/peopledoc/django-ticketoffice
* Roadmap: https://github.com/peopledoc/django-ticketoffice/issues/milestones.. _`django-mail-factory`:
https://pypi.python.org/pypi/django-mail-factory
.. _`vision`:
https://django-ticketoffice.readthedocs.org/en/latest/about/vision.html
.. _`roadmap`:
https://github.com/peopledoc/django-ticketoffice/issues/milestones
.. _`alternatives`:
https://django-ticketoffice.readthedocs.org/en/latest/about/alternatives.html