pki.serializer.issuing_ca

Serializers for Issuing CA-related API endpoints.

Defines classes that handle validation and transformation of Issuing CA model instances to and from JSON.

Classes

IssuingCaSerializer

Serializer for Issuing CA instances.

Module Contents

class pki.serializer.issuing_ca.IssuingCaSerializer(instance=None, data=empty, **kwargs)[source]

Bases: rest_framework.serializers.ModelSerializer[pki.models.CaModel]

Serializer for Issuing CA instances.

common_name[source]
ca_type[source]
ca_type_display[source]
last_crl_issued_at[source]
has_crl[source]
class Meta[source]

Metadata for IssuingCaSerializer, defining model and serialized fields.

model[source]
fields: ClassVar[list[str]] = ['id', 'unique_name', 'common_name', 'ca_type', 'ca_type_display', 'is_active', 'created_at',...[source]
read_only_fields: ClassVar[list[str]] = ['id', 'unique_name', 'common_name', 'ca_type', 'ca_type_display', 'is_active', 'created_at',...[source]
get_has_crl(obj)[source]

Check if the CA has a CRL available.

Parameters:

obj (pki.models.CaModel)

Return type:

bool

get_last_crl_issued_at(obj)[source]

Get the last CRL issued at timestamp.

Parameters:

obj (pki.models.CaModel)

Return type:

str | None

get_common_name(obj)[source]

Get the common name of the CA.

Parameters:

obj (pki.models.CaModel)

Return type:

str