Signals¶
django-ca adds a few custom Django signals to important events to let you execute custom actions when these events happen. Please see Djangos documentation on signals for further information on how to use signals.
If you installed django-ca from source, use the CA_CUSTOM_APPS setting to add a custom django app. Please see the Django documentation on apps if you need help on writing Django apps.
- django_ca.signals.post_create_ca = <django.dispatch.dispatcher.Signal object>¶
Called after a new certificate authority was created.
- Parameters
- ca
CertificateAuthority
The certificate authority that was just created.
- ca
- django_ca.signals.post_issue_cert = <django.dispatch.dispatcher.Signal object>¶
Called after a new certificate was issued.
- Parameters
- cert
Certificate
The certificate that was just issued.
- cert
- django_ca.signals.post_revoke_cert = <django.dispatch.dispatcher.Signal object>¶
Called after a certificate was revoked
- Parameters
- cert
Certificate
The certificate that was just revoked.
- cert
- django_ca.signals.pre_create_ca = <django.dispatch.dispatcher.Signal object>¶
Called before a new certificate authority is created.
- Parameters
- namestr
The name of the future CA.
- **kwargs
- django_ca.signals.pre_issue_cert = <django.dispatch.dispatcher.Signal object>¶
Called before a new certificate is issued.
- Parameters
- ca
- csr
- **kwargs
All additional parameters passed to
create_cert()
, but normalized to expected values. For example, this signal will receive aKeyUsage
instance, regardless of how the parameter was actually passed.
- django_ca.signals.pre_revoke_cert = <django.dispatch.dispatcher.Signal object>¶
Called before a certificate is revoked.
- Parameters
- ca
- csr
- **kwargs