sources/saml: add POST_AUTO binding which auto redirects to IdP

This commit is contained in:
Jens Langhammer
2020-07-08 14:18:08 +02:00
parent 1524880eec
commit 1e57926603
4 changed files with 46 additions and 3 deletions

View File

@ -2,6 +2,7 @@
from django import forms
from passbook.flows.models import Flow, FlowDesignation
from passbook.admin.forms.source import SOURCE_FORM_FIELDS
from passbook.sources.saml.models import SAMLSource
@ -9,6 +10,13 @@ from passbook.sources.saml.models import SAMLSource
class SAMLSourceForm(forms.ModelForm):
"""SAML Provider form"""
authentication_flow = forms.ModelChoiceField(
queryset=Flow.objects.filter(designation=FlowDesignation.AUTHENTICATION)
)
enrollment_flow = forms.ModelChoiceField(
queryset=Flow.objects.filter(designation=FlowDesignation.ENROLLMENT)
)
class Meta:
model = SAMLSource