snok / django-auth-adfs

A Django authentication backend for Microsoft ADFS and AzureAD
http://django-auth-adfs.readthedocs.io/
BSD 2-Clause "Simplified" License
270 stars 98 forks source link

Update drf_urls.py #273

Closed marshad96 closed 1 year ago

marshad96 commented 1 year ago

When using with DRF I was getting django.urls.exceptions.NoReverseMatch: Reverse for 'logout' not found. 'logout' is not a valid view function or pattern name. to cope that I made a fix.

tim-schilling commented 1 year ago

This may be unrelated to the PR, but still related to logging out. @JonasKs should the logout view also support post since Django has been moving in that direction? https://docs.djangoproject.com/en/4.1/topics/auth/default/#django.contrib.auth.views.LogoutView

JonasKs commented 1 year ago

This may be unrelated to the PR, but still related to logging out. @JonasKs should the logout view also support post since Django has been moving in that direction? https://docs.djangoproject.com/en/4.1/topics/auth/default/#django.contrib.auth.views.LogoutView

I agree on this! We can deprecate just like Django does, imo.

codecov[bot] commented 1 year ago

Codecov Report

Merging #273 (9613730) into master (896d65b) will increase coverage by 0.0%. The diff coverage is n/a.

@@          Coverage Diff           @@
##           master    #273   +/-   ##
======================================
  Coverage    86.3%   86.3%           
======================================
  Files           8      11    +3     
  Lines         497     549   +52     
======================================
+ Hits          429     474   +45     
- Misses         68      75    +7     
Impacted Files Coverage Δ
django_auth_adfs/drf_urls.py 100.0% <ø> (ø)
django_auth_adfs/views.py 85.1% <0.0%> (ø)
django_auth_adfs/__init__.py 100.0% <0.0%> (ø)
django_auth_adfs/urls.py 100.0% <0.0%> (ø)
JonasKs commented 1 year ago

Thank you!