diff --git a/README b/README index c8d5177..0fe533b 100644 --- a/README +++ b/README @@ -20,6 +20,11 @@ the django-mellon adapter: And appropriate django-mellon parameters (MELLON_PUBLIC_KEYS, MELLON_PRIVATE_KEY, MELLON_IDENTITY_PROVIDERS). +You also have to register the plugin: + + INSTALLED_APPS += ('authentic2_auth_fedict') + AUTHENTICATION_BACKENDS += ('authentic2_auth_fedict.backends.FedictBackend',) + Code Style ---------- diff --git a/check-migrations.sh b/check-migrations.sh index 8d5dc7d..1753c53 100755 --- a/check-migrations.sh +++ b/check-migrations.sh @@ -12,6 +12,7 @@ DATABASES = { 'ENGINE': 'django.db.backends.dummy', } } +INSTALLED_APPS += ('authentic2_auth_fedict',) EOF TEMPFILE=`mktemp` trap "rm -f ${TEMPFILE} ${CHECK_MIGRATIONS_SETTINGS}" EXIT diff --git a/setup.py b/setup.py index 6f707e9..c1c7bda 100755 --- a/setup.py +++ b/setup.py @@ -98,11 +98,6 @@ setup( install_requires=[ 'authentic2', ], - entry_points={ - 'authentic2.plugin': [ - 'authentic2-auth-fedict = authentic2_auth_fedict.apps:Plugin', - ], - }, cmdclass={ 'build': build, 'install_lib': install_lib, diff --git a/src/authentic2_auth_fedict/apps.py b/src/authentic2_auth_fedict/apps.py index 21aa9a2..25aa225 100644 --- a/src/authentic2_auth_fedict/apps.py +++ b/src/authentic2_auth_fedict/apps.py @@ -37,6 +37,9 @@ class AppConfig(AppConfig): user = kwargs.get('user') user.backend = 'authentic2_auth_fedict.backends.FedictBackend' + def get_a2_plugin(self): + return Plugin() + class Plugin: def get_before_urls(self): @@ -44,12 +47,6 @@ class Plugin: return urls.urlpatterns - def get_apps(self): - return ['mellon', 'authentic2_auth_fedict'] - - def get_authentication_backends(self): - return ['authentic2_auth_fedict.backends.FedictBackend'] - def registration_form_prefill(self, request): if request.token.get('first_name'): return [ diff --git a/tests/settings.py b/tests/settings.py index ea5445e..47ebe1e 100644 --- a/tests/settings.py +++ b/tests/settings.py @@ -36,5 +36,8 @@ MELLON_ATTRIBUTE_MAPPING = { "first_name": "{attri,butes[givenName][0]}", } +INSTALLED_APPS += ('authentic2_auth_fedict',) +AUTHENTICATION_BACKENDS += ('authentic2_auth_fedict.backends.FedictBackend',) + # test hook handlers A2_HOOKS_PROPAGATE_EXCEPTIONS = True