Skip to content

Commit 5d71331

Browse files
committed
Release: v1.0.0
1 parent d684fb7 commit 5d71331

File tree

7 files changed

+33
-11
lines changed

7 files changed

+33
-11
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ built in to DRF. However, it adds some extra sauce:
2727
- 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.
2828
- Durin **tokens can be renewed** to get a fresh expiry.
2929
- Durin provides a `CachedTokenAuthentication` backend as well which uses memoization for faster look ups.
30-
- 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.,
30+
- 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.,
3131
- 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".
3232
- 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.
3333

docs/source/changelog.rst

+22
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,28 @@
11
Changelog
22
============
33

4+
`v1.0.0 <https://github.com/eshaan7/django-rest-durin/releases/tag/v1.0.0>`__
5+
--------------------------------------------------------------------------------
6+
7+
.. Note::
8+
If in your ``urls.py`` you have a url pattern with ``include("durin.urls"))``, then
9+
2 new URL paths ``apiaccess/`` and ``sessions/`` will get added
10+
to your project if you upgrade to this version.
11+
12+
If you do not wish to have these new views, remove the above include statement and
13+
refer to `durin/urls.py`_ on how to define the URL patterns selectively for the views you want.
14+
15+
**Features:**
16+
17+
- Session Management serializers and views. (Issue 19_)
18+
19+
Refer to Session-Management-Views_ i.e.,
20+
- 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".
21+
- 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.
22+
23+
.. _19: https://github.com/Eshaan7/django-rest-durin/issues/19
24+
.. _Session-Management-Views: views.html#session-management-views
25+
.. _durin/urls.py: https://github.com/Eshaan7/django-rest-durin/blob/main/durin/urls.py
426

527
`v0.4.0 <https://github.com/eshaan7/django-rest-durin/releases/tag/v0.4.0>`__
628
--------------------------------------------------------------------------------

docs/source/conf.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
copyright = "2020, Eshaan Bansal"
3232
author = "Eshaan Bansal"
3333

34-
version = "0.4.0"
34+
version = "1.0.0"
3535
# The full version, including alpha/beta/rc tags
36-
release = "v0.4.0"
36+
release = "v1.0.0"
3737

3838

3939
# -- General configuration ---------------------------------------------------

docs/source/urls.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
URLs (``durin.urls``)
22
========================
33

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

66
This can easily be included in your url config:
77

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

3030
they can also be looked up by name::
3131

32-
from django.urls import reverse
32+
from rest_framework import reverse
3333

3434
reverse('durin_login')
3535
reverse('durin_logout')

durin/serializers.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class TokenSessionsSerializer(rfs.ModelSerializer):
1818
"""
1919
Used in :class:`durin.views.TokenSessionsViewSet`.
2020
21-
.. versionadded:: unreleased
21+
.. versionadded:: 1.0.0
2222
"""
2323

2424
class Meta:
@@ -57,7 +57,7 @@ class APIAccessTokenSerializer(rfs.ModelSerializer):
5757
"""
5858
Used in :class:`durin.views.APIAccessTokenView`.
5959
60-
.. versionadded:: unreleased
60+
.. versionadded:: 1.0.0
6161
"""
6262

6363
class Meta:

durin/views.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ class TokenSessionsViewSet(
206206
- Returns list of active sessions of authed user.
207207
- Only ``list()`` and ``delete()`` operations.
208208
209-
.. versionadded:: unreleased
209+
.. versionadded:: 1.0.0
210210
"""
211211

212212
queryset = AuthToken.objects.select_related("client").all()
@@ -242,7 +242,7 @@ class APIAccessTokenView(APIView):
242242
- ``POST`` -> create and get token-client pair info
243243
- ``DELETE`` -> delete existing API access token
244244
245-
.. versionadded:: unreleased
245+
.. versionadded:: 1.0.0
246246
"""
247247

248248
@property

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
setup(
2020
name="django-rest-durin",
2121
url=GITHUB_URL,
22-
version="0.4.0",
22+
version="1.0.0",
2323
license="MIT",
2424
description="""
2525
Per API client token authentication Module for django rest framework.

0 commit comments

Comments
 (0)