pki.views.certificatesΒΆ
This module contains all views concerning the PKI -> Certificates section.
AttributesΒΆ
ClassesΒΆ
View that redirects to the index of the PKI Issuing CA application: Issuing CAs. |
|
Mixin which adds data to the context for the PKI -> Certificates application. |
|
Certificate Table View. |
|
The certificate detail view. |
|
View for downloading a single certificate. |
|
View for downloading a single certificate. |
|
View for downloading multiple certificates at once as archived files. |
|
View for downloading the TLS server certificate of trustpoint. |
|
ViewSet for managing Certificate instances. |
Module ContentsΒΆ
- class pki.views.certificates.CertificatesRedirectView(**kwargs)[source]ΒΆ
Bases:
django.views.generic.base.RedirectViewView that redirects to the index of the PKI Issuing CA application: Issuing CAs.
- class pki.views.certificates.CertificatesContextMixin[source]ΒΆ
Bases:
trustpoint.page_context.PageContextMixinMixin which adds data to the context for the PKI -> Certificates application.
- class pki.views.certificates.CertificateTableView[source]ΒΆ
Bases:
CertificatesContextMixin,trustpoint.views.base.SortableTableMixin[pki.models.CertificateModel],django.views.generic.list.ListView[pki.models.CertificateModel]Certificate Table View.
- class pki.views.certificates.CertificateDetailView[source]ΒΆ
Bases:
CertificatesContextMixin,django.views.generic.detail.DetailView[pki.models.CertificateModel]The certificate detail view.
- class pki.views.certificates.IssuingCaCertificateDownloadView[source]ΒΆ
Bases:
CertificatesContextMixin,django.views.generic.detail.DetailView[pki.models.CertificateModel]View for downloading a single certificate.
- get(request, *args, **kwargs)[source]ΒΆ
HTTP GET Method.
If only the certificate primary key are passed in the url, the download summary will be displayed. If value for file_format is also provided, a file download will be performed.
Compare the re_path regex in the pki.urls package.
- Parameters:
request (django.http.HttpRequest) β The HttpRequest object.
pk β A string containing the certificate primary key.
*args (Any) β Positional arguments.
**kwargs (Any) β Keyword arguments.
- Returns:
The HTTP response with either the download summary or a file download.
- Return type:
HttpResponse
- Raises:
Http404 β
- class pki.views.certificates.CertificateDownloadView[source]ΒΆ
Bases:
CertificatesContextMixin,django.views.generic.detail.DetailView[pki.models.CertificateModel]View for downloading a single certificate.
- get(request, pk=None, file_format=None, *args, **kwargs)[source]ΒΆ
HTTP GET Method.
If only the certificate primary key are passed in the url, the download summary will be displayed. If value for file_format is also provided, a file download will be performed.
Compare the re_path regex in the pki.urls package.
- Parameters:
request (django.http.HttpRequest) β The HttpRequest object.
pk (str | None) β A string containing the certificate primary key.
file_format (str | None) β The format of the certificate to download.
*args (tuple[Any]) β Positional arguments.
**kwargs (dict[str, Any]) β Keyword arguments.
- Returns:
The HTTP response with either the download summary or a file download.
- Return type:
HttpResponse
- Raises:
Http404 β
- class pki.views.certificates.CertificateMultipleDownloadView[source]ΒΆ
Bases:
CertificatesContextMixin,trustpoint.views.base.PrimaryKeyListFromPrimaryKeyString,django.views.generic.list.ListView[pki.models.CertificateModel]View for downloading multiple certificates at once as archived files.
- get_context_data(*args, **kwargs)[source]ΒΆ
Adding the part of the url to the context, that contains the certificate primary keys.
This is used for the {% url }% tags in the template to download files.
- Parameters:
*args (Any) β Positional arguments passed to super().get_context_data().
**kwargs (Any) β Keyword arguments passed to super().get_context_data().
- Returns:
The context data.
- Return type:
dict
- get(request, pks=None, file_format=None, archive_format=None, *args, **kwargs)[source]ΒΆ
HTTP GET Method.
If only certificate primary keys are passed in the url, the download summary will be displayed. If value for file_format and archive_format are also provided, a file download will be performed.
Compare the re_path regex in the pki.urls package.
- Parameters:
request (django.http.HttpRequest) β The HttpRequest object.
pks (str | None) β A string containing the certificate primary keys, e.g. 1/2/3/4/5
file_format (None | str) β The format of the archived certificate files.
archive_format (None | str) β The archive format that will be provided as download.
*args (tuple[Any]) β Positional arguments.
**kwargs (dict[str, Any]) β Keyword arguments.
- Returns:
The HTTP response with either the download summary or a file download.
- Return type:
HttpResponse
- Raises:
Http404 β
- class pki.views.certificates.TlsServerCertificateDownloadView[source]ΒΆ
Bases:
CertificatesContextMixin,django.views.generic.detail.DetailView[pki.models.CertificateModel]View for downloading the TLS server certificate of trustpoint.
- class pki.views.certificates.CertificateViewSet(**kwargs)[source]ΒΆ
Bases:
rest_framework.viewsets.ModelViewSet[pki.models.CertificateModel]ViewSet for managing Certificate instances.
Supports standard CRUD operations such as list, retrieve, create, update, and delete.