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/providers/proxy/forms.py

25 lines
655 B
Python
Raw Normal View History

2020-08-19 08:32:44 +00:00
"""passbook Proxy Provider Forms"""
from django import forms
from passbook.providers.proxy.models import ProxyProvider
class ProxyProviderForm(forms.ModelForm):
"""Security Gateway Provider form"""
instance: ProxyProvider
def save(self, *args, **kwargs):
self.instance.set_oauth_defaults()
return super().save(*args, **kwargs)
class Meta:
model = ProxyProvider
fields = ["name", "authorization_flow", "internal_host", "external_host"]
widgets = {
"name": forms.TextInput(),
"internal_host": forms.TextInput(),
"external_host": forms.TextInput(),
}