update Frontend class to match recent authentic changes

commit c237f561bd866bb261ea2f082c91a4b607a8284a
Author: Mikaël Ates <mates@entrouvert.com>
Date:   Mon Jun 13 16:50:45 2016 +0200

    Enhance get backends helper function and registration frontend management
    (fixes #11324).
This commit is contained in:
Frédéric Péters 2016-06-27 08:32:55 +02:00
parent ac16228b21
commit 12aaadd2c1
2 changed files with 4 additions and 5 deletions

2
debian/control vendored
View File

@ -10,6 +10,6 @@ X-Python-Version: >= 2.6
Package: python-authentic2-auth-fedict
Architecture: all
Depends: ${misc:Depends},
python-authentic2 (>= 2.1.20.1000)
python-authentic2 (>= 2.1.20.1009)
Description: Fedict authentication frontend for Authentic2

View File

@ -27,18 +27,17 @@ from . import app_settings
class FedictFrontend(object):
id = 'fedict'
def enabled(self):
return app_settings.enable and list(get_idps())
def name(self):
return _('Belgian eID')
def id(self):
return 'fedict'
def login(self, request, *args, **kwargs):
context_instance = kwargs.pop('context_instance', None) or RequestContext(request)
submit_name = 'login-%s' % self.id()
submit_name = 'login-%s' % self.id
if request.method == 'POST' and submit_name in request.POST:
return redirect_to_login(request, login_url='fedict-login')
return render(request, 'authentic2_auth_fedict/login.html', {'submit_name': submit_name},