Skip to content

Commit

Permalink
Fixed up changelog (and docs) for new features (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
kumar303 committed Apr 5, 2017
1 parent 1859023 commit 19a3640
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.DS_Store
.noseids
.tox
.venv
docs/_build/*
*~
*.mo
Expand Down
Empty file added docs/_static/.keep-for-git
Empty file.
8 changes: 7 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Requirements:
* `Django`_ 1.8 through 1.11
* `Django Rest Framework`_ 3.4 or 3.5
* `mohawk`_

(Older versions of these libraries may work, but support is not guaranteed.)

Using `pip`_, install the module like this::
Expand Down Expand Up @@ -93,12 +94,17 @@ Changelog
use ``rest_framework.permissions.IsAuthenticated`` on your views
:ref:`as documented <protecting-api-views>`

- **Unreleased**
- **1.0.0 (2017-04-05)**

- Added support for a ``HAWK_USER_LOOKUP`` setting.
See :ref:`usage`.
- Added hooks to make subclassing ``HawkAuthentication`` easier.
See :ref:`usage`.
- Dropped support for Django 1.6/1.7.
- Dropped support for django-rest-framework 3.2/3.3.
- Confirmed support for django-rest-framework 3.4/3.5.
- Added support for Django 1.10/1.11.
- Started using `semantic versioning <http://semver.org/>`_.

- **0.0.10** (2016-06-01)

Expand Down
12 changes: 8 additions & 4 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ Alternately, you can subclass ``HawkAuthentication`` and override the ``hawk_cre

.. code-block:: python
from hawkrest import HawkAuthentication
class YourHawk(HawkAuthentication):
def hawk_credentials_lookup(self, id):
user = HawkUser.objects.get(some_id=id)
Expand Down Expand Up @@ -125,6 +127,8 @@ Alternately, you can subclass ``HawkAuthentication`` and override the ``hawk_use

.. code-block:: python
from hawkrest import HawkAuthentication
class YourHawk(HawkAuthentication):
def hawk_user_lookup(self, request, credentials):
return HawkUser.objects.get(some_id=credentials['id'])
Expand All @@ -149,10 +153,10 @@ expires:
HAWK_MESSAGE_EXPIRATION = 60
To `prevent replay attacks`_, Hawkrest uses the Django cache framework
for nonce lookups. You should configure Django with something robust
like `memcache`_. By default, Django uses in-memory caching so by
default nonce checking will be activated. If you need to *disable* it
for some reason, set this:
for nonce lookups. You should configure Django with something
like `memcache`_ in production. By default, Django uses in-memory
caching and by default nonce checking will be activated. If you need to
*disable* it for some reason, set this:

.. code-block:: python
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


setup(name='hawkrest',
version='0.0.10',
version='1.0.0',
description="Hawk HTTP Authorization for Django Rest Framework",
long_description='',
author='Kumar McMillan',
Expand All @@ -28,4 +28,4 @@
'Topic :: Internet :: WWW/HTTP',
],
packages=find_packages(exclude=['tests']),
install_requires=['djangorestframework', 'mohawk>=0.3.3'])
install_requires=['djangorestframework', 'mohawk>=0.3.4'])

0 comments on commit 19a3640

Please sign in to comment.