Skip to content

Commit

Permalink
Release: v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
eshaan7 committed Jan 20, 2022
1 parent d684fb7 commit 5d71331
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ built in to DRF. However, it adds some extra sauce:
- Durin provides an option for a logged in user to **remove all tokens** that the server has - forcing them to re-authenticate for all API clients.
- Durin **tokens can be renewed** to get a fresh expiry.
- Durin provides a `CachedTokenAuthentication` backend as well which uses memoization for faster look ups.
- Durin provides **Session Management** features. Refer to [Session Management Views](https://django-rest-durin.readthedocs.io/en/latest/views.html#Session-Management-Views) i.e.,
- Durin provides **Session Management** features. Refer to [Session Management Views](https://django-rest-durin.readthedocs.io/en/latest/views.html#session-management-views) i.e.,
- REST view for an authenticated user to get list of sessions (in context of django-rest-durin, this means `AuthToken` instances) and revoke a session. Useful for pages like "View active browser sessions".
- REST view for an authenticated user to get/create/delete token against a pre-defined client. Useful for pages like "Get API key" where a user can get an API key to be able to interact directly with your project's RESTful API using cURL or a custom client.

Expand Down
22 changes: 22 additions & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
Changelog
============

`v1.0.0 <https://github.com/eshaan7/django-rest-durin/releases/tag/v1.0.0>`__
--------------------------------------------------------------------------------

.. Note::
If in your ``urls.py`` you have a url pattern with ``include("durin.urls"))``, then
2 new URL paths ``apiaccess/`` and ``sessions/`` will get added
to your project if you upgrade to this version.

If you do not wish to have these new views, remove the above include statement and
refer to `durin/urls.py`_ on how to define the URL patterns selectively for the views you want.

**Features:**

- Session Management serializers and views. (Issue 19_)

Refer to Session-Management-Views_ i.e.,
- REST view for an authenticated user to get list of sessions (in context of django-rest-durin, this means ``AuthToken`` instances) and revoke a session. Useful for pages like "View active browser sessions".
- REST view for an authenticated user to get/create/delete token against a pre-defined client. Useful for pages like "Get API key" where a user can get an API key to be able to interact directly with your project's RESTful API using cURL or a custom client.

.. _19: https://github.com/Eshaan7/django-rest-durin/issues/19
.. _Session-Management-Views: views.html#session-management-views
.. _durin/urls.py: https://github.com/Eshaan7/django-rest-durin/blob/main/durin/urls.py

`v0.4.0 <https://github.com/eshaan7/django-rest-durin/releases/tag/v0.4.0>`__
--------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
copyright = "2020, Eshaan Bansal"
author = "Eshaan Bansal"

version = "0.4.0"
version = "1.0.0"
# The full version, including alpha/beta/rc tags
release = "v0.4.0"
release = "v1.0.0"


# -- General configuration ---------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions docs/source/urls.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
URLs (``durin.urls``)
========================

Durin provides a URL config ready with its 4 default views routed.
Durin provides a URL config ready with its 6 default views routed.

This can easily be included in your url config:

Expand All @@ -11,7 +11,7 @@ This can easily be included in your url config:
urlpatterns = [
#...snip...
url(r'api/auth/', include('durin.urls'))
re_path(r'api/auth/', include('durin.urls'))
#...snip...
]
Expand All @@ -29,7 +29,7 @@ The views would then accessible as:

they can also be looked up by name::

from django.urls import reverse
from rest_framework import reverse

reverse('durin_login')
reverse('durin_logout')
Expand Down
4 changes: 2 additions & 2 deletions durin/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class TokenSessionsSerializer(rfs.ModelSerializer):
"""
Used in :class:`durin.views.TokenSessionsViewSet`.
.. versionadded:: unreleased
.. versionadded:: 1.0.0
"""

class Meta:
Expand Down Expand Up @@ -57,7 +57,7 @@ class APIAccessTokenSerializer(rfs.ModelSerializer):
"""
Used in :class:`durin.views.APIAccessTokenView`.
.. versionadded:: unreleased
.. versionadded:: 1.0.0
"""

class Meta:
Expand Down
4 changes: 2 additions & 2 deletions durin/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ class TokenSessionsViewSet(
- Returns list of active sessions of authed user.
- Only ``list()`` and ``delete()`` operations.
.. versionadded:: unreleased
.. versionadded:: 1.0.0
"""

queryset = AuthToken.objects.select_related("client").all()
Expand Down Expand Up @@ -242,7 +242,7 @@ class APIAccessTokenView(APIView):
- ``POST`` -> create and get token-client pair info
- ``DELETE`` -> delete existing API access token
.. versionadded:: unreleased
.. versionadded:: 1.0.0
"""

@property
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
setup(
name="django-rest-durin",
url=GITHUB_URL,
version="0.4.0",
version="1.0.0",
license="MIT",
description="""
Per API client token authentication Module for django rest framework.
Expand Down

0 comments on commit 5d71331

Please sign in to comment.