This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/passbook/channels/in_saml/forms.py

31 lines
840 B
Python
Raw Normal View History

2019-11-07 16:02:56 +00:00
"""passbook SAML SP Forms"""
from django import forms
from django.contrib.admin.widgets import FilteredSelectMultiple
from django.utils.translation import gettext as _
2019-11-07 16:02:56 +00:00
from passbook.admin.forms.inlet import INLET_FORM_FIELDS
from passbook.channels.in_saml.models import SAMLInlet
2019-11-07 16:02:56 +00:00
class SAMLInletForm(forms.ModelForm):
"""SAML Inlet form"""
2019-11-07 16:02:56 +00:00
class Meta:
model = SAMLInlet
fields = INLET_FORM_FIELDS + [
"issuer",
2019-12-31 11:51:16 +00:00
"idp_url",
"idp_logout_url",
"auto_logout",
2020-03-03 22:35:38 +00:00
"signing_kp",
2019-12-31 11:51:16 +00:00
]
2019-11-07 16:02:56 +00:00
widgets = {
2019-12-31 11:51:16 +00:00
"name": forms.TextInput(),
"policies": FilteredSelectMultiple(_("policies"), False),
"issuer": forms.TextInput(),
2019-12-31 11:51:16 +00:00
"idp_url": forms.TextInput(),
"idp_logout_url": forms.TextInput(),
2019-11-07 16:02:56 +00:00
}