0001-misc-add-support-for-.well-known-change-password-URI.patch
src/authentic2/urls.py | ||
---|---|---|
22 | 22 |
from django.contrib.staticfiles.views import serve |
23 | 23 |
from django.utils.translation import ugettext_lazy as _ |
24 | 24 |
from django.views.decorators.clickjacking import xframe_options_deny |
25 |
from django.views.generic import RedirectView |
|
25 | 26 |
from django.views.generic.base import TemplateView |
26 | 27 |
from django.views.static import serve as media_serve |
27 | 28 | |
... | ... | |
115 | 116 |
url(r'^manage/', include('authentic2.manager.urls')), |
116 | 117 |
url(r'^api/', include('authentic2.api_urls')), |
117 | 118 |
url(r'^continue/$', views.display_message_and_continue, name='continue'), |
119 |
url(r'^\.well-known/change-password$', RedirectView.as_view(pattern_name='password_change')), |
|
118 | 120 |
] |
119 | 121 | |
120 | 122 |
try: |
tests/test_views.py | ||
---|---|---|
54 | 54 |
assert_event('user.password.change', user=simple_user, session=app.session) |
55 | 55 | |
56 | 56 | |
57 |
def test_well_known_password_change(app): |
|
58 |
resp = app.get('/.well-known/change-password') |
|
59 |
assert resp.location == '/accounts/password/change/' |
|
60 | ||
61 | ||
57 | 62 |
def test_account_delete(app, simple_user, mailoutbox): |
58 | 63 |
assert simple_user.is_active |
59 | 64 |
assert len(mailoutbox) == 0 |
60 |
- |