39 lines
1.5 KiB
Diff
39 lines
1.5 KiB
Diff
diff --git a/allauth_cas/signals.py b/allauth_cas/signals.py
|
|
index 36c9b24..530c26e 100644
|
|
--- a/allauth_cas/signals.py
|
|
+++ b/allauth_cas/signals.py
|
|
@@ -1,4 +1,4 @@
|
|
-from allauth.account.adapter import get_adapter
|
|
+from allauth.socialaccount.adapter import get_adapter
|
|
from allauth.account.utils import get_next_redirect_url
|
|
from allauth.socialaccount import providers
|
|
from django.contrib.auth.signals import user_logged_out
|
|
@@ -14,7 +14,7 @@ def cas_account_logout(sender, request, **kwargs):
|
|
if not provider_id:
|
|
return
|
|
|
|
- provider = providers.registry.by_id(provider_id, request)
|
|
+ provider = get_adapter(request).get_provider(request, provider_id)
|
|
|
|
if not provider.message_suggest_caslogout_on_logout(request):
|
|
return
|
|
diff --git a/allauth_cas/views.py b/allauth_cas/views.py
|
|
index d08e354..9e81e53 100644
|
|
--- a/allauth_cas/views.py
|
|
+++ b/allauth_cas/views.py
|
|
@@ -1,5 +1,5 @@
|
|
import cas
|
|
-from allauth.account.adapter import get_adapter
|
|
+from allauth.socialaccount.adapter import get_adapter
|
|
from allauth.account.utils import get_next_redirect_url
|
|
from allauth.socialaccount import providers
|
|
from allauth.socialaccount.helpers import (
|
|
@@ -56,7 +56,7 @@ class CASAdapter:
|
|
"""
|
|
Returns a provider instance for the current request.
|
|
"""
|
|
- return providers.registry.by_id(self.provider_id, self.request)
|
|
+ return get_adapter(self.request).get_provider(self.request, self.provider_id)
|
|
|
|
def complete_login(self, request, response):
|
|
"""
|