Skip to content

Commit

Permalink
Merge pull request #42 from johngian/fix-callback-view
Browse files Browse the repository at this point in the history
Fix overriding callback class.
  • Loading branch information
johngian committed Nov 2, 2016
2 parents 22d450b + 3385945 commit 8326b68
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mozilla_django_oidc/urls.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
from django.conf.urls import url
from django.utils.module_loading import import_string

from mozilla_django_oidc import views
from mozilla_django_oidc.utils import import_from_settings

DEFAULT_CALLBACK_CLASS = 'mozilla_django_oidc.views.OIDCAuthenticationCallbackView'
CALLBACK_CLASS_PATH = import_from_settings('OIDC_CALLBACK_CLASS', DEFAULT_CALLBACK_CLASS)

OIDCCallbackClass = import_from_settings('OIDC_CALLBACK_CLASS',
views.OIDCAuthenticationCallbackView)

OIDCCallbackClass = import_string(CALLBACK_CLASS_PATH)

urlpatterns = [
url(r'^callback/$', OIDCCallbackClass.as_view(),
Expand Down

0 comments on commit 8326b68

Please sign in to comment.