Implement the authentication frontend using the new API
This commit is contained in:
parent
72978bd650
commit
981e7259e9
|
@ -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)
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
{% include "authentic2_auth_msp/connecting.html" with popup=1 %}
|
Reference in New Issue