Views
Views of the django-e2ee-framework app to be imported via the url
config (see django_e2ee.urls
).
Classes:
A mixin that gets a form to login or create an E2EE password. |
|
|
A view to create and get |
|
A viewset for |
|
Retreive the master key of the user. |
|
A viewset for a users |
|
A view to create and retrieve a users |
|
Retreive the master key of the user. |
|
A viewset for a users |
Functions:
|
- class django_e2ee.views.E2ELoginViewMixin
Bases:
object
A mixin that gets a form to login or create an E2EE password.
This mixin provides an additional
e2ee_login_form
context variable for the template. Depending on the fact whether the user already created an E2EE password, this can be adjango_e2ee.forms.PasswordCreateForm
to create a new E2EE password, or adjango_e2ee.forms.PasswordInputForm
to enter the password.Additionally, it adds a context variable
e2ee_login_url
that points to the URL where the form should be submitted.Methods:
get_context_data
(**kwargs)- get_context_data(**kwargs)
- class django_e2ee.views.EncryptionKeySecretView(**kwargs)
Bases:
RetrieveAPIView
,CreateAPIView
A view to create and get
e2ee.EncryptionKeySecret
.Methods:
Returns the object the view is displaying.
Get the list of items for this view.
get_serializer
(*args, **kwargs)Return the serializer instance that should be used for validating and deserializing input, and for serializing output.
Attributes:
Classes:
alias of
EncryptionKeySecretSerializer
- get_object()
Returns the object the view is displaying.
You may want to override this if you need to provide non-standard queryset lookups. Eg if objects are referenced using multiple keyword arguments in the url conf.
- get_queryset()
Get the list of items for this view. This must be an iterable, and may be a queryset. Defaults to using self.queryset.
This method should always be used rather than accessing self.queryset directly, as self.queryset gets evaluated only once, and those results are cached for all subsequent requests.
You may want to override this if you need to provide different querysets depending on the incoming request.
(Eg. return a list of items that is specific to the user)
- get_serializer(*args, **kwargs)
Return the serializer instance that should be used for validating and deserializing input, and for serializing output.
- permission_classes = [<class 'rest_framework.permissions.IsAuthenticated'>, <class 'django_e2ee.permissions.HasEncryptionSecretPermission'>]
- queryset
- serializer_class
alias of
EncryptionKeySecretSerializer
Classes:Meta
()Methods:
create
(validated_data)We have a bit of extra checking around this in order to provide descriptive messages when something goes wrong, but this method is essentially just:
- class django_e2ee.views.EncryptionKeyViewSet(**kwargs)
Bases:
ModelViewSet
A viewset for
e2ee.EncryptionKey
Attributes:
Methods:
Get the list of items for this view.
Classes:
alias of
EncryptionKeySerializer
- basename = None
- description = None
- detail = None
- get_queryset()
Get the list of items for this view. This must be an iterable, and may be a queryset. Defaults to using self.queryset.
This method should always be used rather than accessing self.queryset directly, as self.queryset gets evaluated only once, and those results are cached for all subsequent requests.
You may want to override this if you need to provide different querysets depending on the incoming request.
(Eg. return a list of items that is specific to the user)
- name = None
- permission_classes = [<class 'rest_framework.permissions.IsAuthenticated'>]
- queryset
- serializer_class
alias of
EncryptionKeySerializer
Classes:Meta
()Methods:
create
(validated_data)We have a bit of extra checking around this in order to provide descriptive messages when something goes wrong, but this method is essentially just:
- suffix = None
- class django_e2ee.views.MasterKeyRetrieveView(**kwargs)
Bases:
RetrieveAPIView
Retreive the master key of the user.
Methods:
Returns the object the view is displaying.
Attributes:
Classes:
alias of
MasterKeySerializer
- get_object()
Returns the object the view is displaying.
You may want to override this if you need to provide non-standard queryset lookups. Eg if objects are referenced using multiple keyword arguments in the url conf.
- permission_classes = [<class 'rest_framework.permissions.IsAuthenticated'>]
- serializer_class
alias of
MasterKeySerializer
Classes:Meta
()Methods:
create
(validated_data)We have a bit of extra checking around this in order to provide descriptive messages when something goes wrong, but this method is essentially just:
- class django_e2ee.views.MasterKeySecretViewSet(**kwargs)
Bases:
ModelViewSet
A viewset for a users
e2ee.MasterKeySecret
Attributes:
Methods:
Get the list of items for this view.
Classes:
alias of
MasterKeySecretSerializer
- basename = None
- description = None
- detail = None
- get_queryset()
Get the list of items for this view. This must be an iterable, and may be a queryset. Defaults to using self.queryset.
This method should always be used rather than accessing self.queryset directly, as self.queryset gets evaluated only once, and those results are cached for all subsequent requests.
You may want to override this if you need to provide different querysets depending on the incoming request.
(Eg. return a list of items that is specific to the user)
- name = None
- permission_classes = [<class 'rest_framework.permissions.IsAuthenticated'>]
- queryset
- serializer_class
alias of
MasterKeySecretSerializer
Classes:Meta
()Methods:
create
(validated_data)We have a bit of extra checking around this in order to provide descriptive messages when something goes wrong, but this method is essentially just:
- suffix = None
- class django_e2ee.views.MasterKeyViewSet(**kwargs)
Bases:
ModelViewSet
A view to create and retrieve a users
e2ee.MasterKey
Attributes:
Classes:
alias of
MasterKeySerializer
- basename = None
- description = None
- detail = None
- name = None
- permission_classes = [<class 'rest_framework.permissions.IsAuthenticated'>, <class 'rest_framework.permissions.DjangoModelPermissions'>]
- queryset
- serializer_class
alias of
MasterKeySerializer
Classes:Meta
()Methods:
create
(validated_data)We have a bit of extra checking around this in order to provide descriptive messages when something goes wrong, but this method is essentially just:
- suffix = None
- class django_e2ee.views.SessionKeyUpdateView(**kwargs)
Bases:
RetrieveAPIView
,UpdateAPIView
Retreive the master key of the user.
Methods:
Returns the object the view is displaying.
Attributes:
Classes:
alias of
SessionKeySerializer
- get_object()
Returns the object the view is displaying.
You may want to override this if you need to provide non-standard queryset lookups. Eg if objects are referenced using multiple keyword arguments in the url conf.
- permission_classes = [<class 'rest_framework.permissions.IsAuthenticated'>]
- serializer_class
alias of
SessionKeySerializer
Classes:Meta
()Methods:
create
(validated_data)We have a bit of extra checking around this in order to provide descriptive messages when something goes wrong, but this method is essentially just:
- class django_e2ee.views.SessionKeyViewSet(**kwargs)
Bases:
ModelViewSet
A viewset for a users
e2ee.SessionKey
Attributes:
Methods:
Get the list of items for this view.
Classes:
alias of
SessionKeySerializer
- basename = None
- description = None
- detail = None
- get_queryset()
Get the list of items for this view. This must be an iterable, and may be a queryset. Defaults to using self.queryset.
This method should always be used rather than accessing self.queryset directly, as self.queryset gets evaluated only once, and those results are cached for all subsequent requests.
You may want to override this if you need to provide different querysets depending on the incoming request.
(Eg. return a list of items that is specific to the user)
- name = None
- permission_classes = [<class 'rest_framework.permissions.IsAuthenticated'>]
- queryset
- serializer_class
alias of
SessionKeySerializer
Classes:Meta
()Methods:
create
(validated_data)We have a bit of extra checking around this in order to provide descriptive messages when something goes wrong, but this method is essentially just:
- suffix = None
- django_e2ee.views.dummy_view(request, *args, **kwargs)