Implement the authentication frontend using the new API

This commit is contained in:
Benjamin Dauvergne 2014-11-21 16:06:23 +01:00
parent 72978bd650
commit 981e7259e9
2 changed files with 11 additions and 8 deletions

View File

@ -1,6 +1,7 @@
from django.utils.translation import gettext_noop
from django.template.loader import render_to_string
from django import forms
from django.template import RequestContext
from django.shortcuts import render
from . import app_settings
@ -14,12 +15,13 @@ class MspFrontend(object):
def id(self):
return 'msp'
def form(self):
return forms.Form
def login(self, request, *args, **kwargs):
context_instance = kwargs.pop('context_instance', None)
return render(request, 'authentic2_auth_msp/login.html',
context_instance=context_instance)
def template(self):
return 'authentic2_auth_msp/connecting.html'
def profile(self, request):
return render_to_string('authentic2_auth_msp/linking.html')
def profile(self, request, *args, **kwargs):
context_instance = kwargs.pop('context_instance', None) or RequestContext(request)
return render_to_string('authentic2_auth_msp/linking.html', {'popup': True},
context_instance=context_instance)

View File

@ -0,0 +1 @@
{% include "authentic2_auth_msp/connecting.html" with popup=1 %}