Skip to content

Commit e390151

Browse files
committed
Merge branch 'master' into jwt-support
# Conflicts: # docs/changelog.rst # rest_auth/registration/views.py
2 parents 511329c + ef56efc commit e390151

File tree

18 files changed

+329
-32
lines changed

18 files changed

+329
-32
lines changed

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ language: python
22
python:
33
- "2.7"
44
env:
5-
- DJANGO=1.7.7
6-
- DJANGO=1.8
5+
- DJANGO=1.7.11
6+
- DJANGO=1.8.9
7+
- DJANGO=1.9.2
78
install:
89
- pip install -q Django==$DJANGO --use-mirrors
910
- pip install coveralls

demo/demo/urls.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
name='email-verification'),
1212
url(r'^login/$', TemplateView.as_view(template_name="login.html"),
1313
name='login'),
14+
url(r'^logout/$', TemplateView.as_view(template_name="logout.html"),
15+
name='logout'),
1416
url(r'^password-reset/$',
1517
TemplateView.as_view(template_name="password_reset.html"),
1618
name='password-reset'),

demo/requirements.pip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
django>=1.7.0
2-
django-rest-auth==0.6.0
2+
django-rest-auth==0.7.0
33
django-allauth==0.24.1
44
six==1.9.0

demo/templates/base.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
<li class="divider"></li>
4141
<!-- these pages require user token -->
4242
<li><a href="{% url 'user-details' %}">User details</a></li>
43+
<li><a href="{% url 'logout' %}">Logout</a></li>
4344
<li><a href="{% url 'password-change' %}">Password change</a></li>
4445
</ul>
4546
</li>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{% block content %}
2+
3+
<form class="form-horizontal ajax-post" role="form" action="{% url 'rest_logout' %}">{% csrf_token %}
4+
<div class="form-group">
5+
<label for="token" class="col-sm-2 control-label">User Token</label>
6+
<div class="col-sm-4">
7+
<input name="token" type="text" class="form-control" id="token" placeholder="Token">
8+
<p class="help-block">Token received after login</p>
9+
</div>
10+
</div>
11+
12+
<div class="form-group">
13+
<div class="col-sm-offset-2 col-sm-10">
14+
<button type="submit" class="btn btn-default">Login</button>
15+
</div>
16+
</div>
17+
18+
<div class="form-group api-response"></div>
19+
</form>
20+
{% endblock %}

demo/templates/logout.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{% extends "base.html" %}
2+
3+
{% block content %}
4+
<div class="row">
5+
<h3>Logout</h3><hr/>
6+
{% include "fragments/logout_form.html" %}
7+
</div>
8+
{% endblock %}

docs/api_endpoints.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ Basic
1111
- password (string)
1212

1313

14-
- /rest-auth/logout/ (POST)
14+
- /rest-auth/logout/ (POST, GET)
15+
16+
.. note:: ``ACCOUNT_LOGOUT_ON_GET = True`` to allow logout using GET (this is the exact same conf from allauth)
17+
18+
- token
1519

1620
- /rest-auth/password/reset/ (POST)
1721

@@ -70,3 +74,8 @@ Basing on example from installation section :doc:`Installation </installation>`
7074

7175
- access_token
7276
- code
77+
78+
- /rest-auth/twitter/ (POST)
79+
80+
- access_token
81+
- token_secret

docs/changelog.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
Changelog
22
=========
33

4-
0.7.0
4+
0.8.0
55
-----
66
- added support for django-rest-framework-jwt
7+
0.7.0
8+
-----
9+
- Wrapped API returned strings in ugettext_lazy
10+
- Fixed not using ``get_username`` which caused issues when using custom user model without username field
11+
- Django 1.9 support
12+
- Added ``TwitterLoginSerializer``
713

814
0.6.0
915
-----
@@ -61,4 +67,4 @@ Changelog
6167
- changed password reset confim url - uid and token should be sent in POST
6268
- increase test coverage
6369
- made compatibile with django 1.7
64-
- removed user profile support
70+
- removed user profile support

docs/configuration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Configuration
3131
...
3232
}
3333
34-
- **REST_AUTH_REGISTRATION_SERIALIZERS**
34+
- **REST_AUTH_REGISTER_SERIALIZERS**
3535

3636
You can define your custom serializers for registration endpoint.
3737
Possible key values:

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Welcome to django-rest-auth's documentation!
77
============================================
88

9-
.. warning:: Updating django-rest-auth to version **0.3.4** is highly recommended because of a security issue in PasswordResetConfirmation validation method.
9+
.. warning:: Updating django-rest-auth from version **0.3.3** is highly recommended because of a security issue in PasswordResetConfirmation validation method.
1010

1111
.. note:: django-rest-auth from v0.3.3 supports django-rest-framework v3.0
1212

0 commit comments

Comments
 (0)