2019-11-07 16:02:56 +00:00
|
|
|
"""SAMLSource API Views"""
|
|
|
|
from rest_framework.serializers import ModelSerializer
|
|
|
|
from rest_framework.viewsets import ModelViewSet
|
|
|
|
|
|
|
|
from passbook.sources.saml.models import SAMLSource
|
|
|
|
|
|
|
|
|
|
|
|
class SAMLSourceSerializer(ModelSerializer):
|
|
|
|
"""SAMLSource Serializer"""
|
|
|
|
|
|
|
|
class Meta:
|
|
|
|
|
|
|
|
model = SAMLSource
|
2019-12-31 11:51:16 +00:00
|
|
|
fields = [
|
|
|
|
"pk",
|
|
|
|
"entity_id",
|
|
|
|
"idp_url",
|
|
|
|
"idp_logout_url",
|
|
|
|
"auto_logout",
|
|
|
|
"signing_cert",
|
|
|
|
]
|
2019-11-07 16:02:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
class SAMLSourceViewSet(ModelViewSet):
|
|
|
|
"""SAMLSource Viewset"""
|
|
|
|
|
|
|
|
queryset = SAMLSource.objects.all()
|
|
|
|
serializer_class = SAMLSourceSerializer
|