Serializers
Serializers for the django-e2ee-framework app.
Classes:
|
|
|
A serialializer for |
|
A serialializer for |
|
A serialializer for |
|
A serialializer for |
|
A serialializer for |
- class django_e2ee.serializers.BulkCreateListSerializer(*args, **kwargs)
Bases:
ListSerializerMethods:
create(validated_data)- create(validated_data)
- class django_e2ee.serializers.EncryptionKeySecretSerializer(*args, **kwargs)
Bases:
ModelSerializerA serialializer for
e2ee.EncryptionKeySecret.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 Meta
Bases:
objectAttributes:
Classes:
alias of
BulkCreateListSerializerModels:
alias of
EncryptionKeySecret- fields = ['encryption_key', 'encrypted_with', 'secret', 'signature', 'signed_by']
- list_serializer_class
alias of
BulkCreateListSerializerMethods:create(validated_data)
- model
alias of
EncryptionKeySecretMiscellaneous:DoesNotExistMultipleObjectsReturnedModel Fields:
encrypted_withAccessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
encryption_keyAccessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
idA wrapper for a deferred-loading field.
secretA wrapper for a deferred-loading field.
signatureA wrapper for a deferred-loading field.
signed_byAccessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
Attributes:
encrypted_with_idencryption_key_idobjectssigned_by_id
- read_only_fields = ['encryption_key', 'signed_by']
- 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:
return ExampleModel.objects.create(**validated_data)
If there are many to many fields present on the instance then they cannot be set until the model is instantiated, in which case the implementation is like so:
example_relationship = validated_data.pop(‘example_relationship’) instance = ExampleModel.objects.create(**validated_data) instance.example_relationship = example_relationship return instance
The default implementation also does not handle nested relationships. If you want to support writable nested relationships you’ll need to write an explicit .create() method.
- class django_e2ee.serializers.EncryptionKeySerializer(*args, **kwargs)
Bases:
ModelSerializerA serialializer for
e2ee.EncryptionKey.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 Meta
Bases:
objectAttributes:
Models:
alias of
EncryptionKey- fields = ['uuid']
- model
alias of
EncryptionKeyMiscellaneous:DoesNotExistMultipleObjectsReturnedModel Fields:
created_byAccessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
uuidA wrapper for a deferred-loading field.
Attributes:
created_by_idencryptionkeysecret_setAccessor to the related objects manager on the reverse side of a many-to-one relation.
master_keysAccessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
objects
- 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:
return ExampleModel.objects.create(**validated_data)
If there are many to many fields present on the instance then they cannot be set until the model is instantiated, in which case the implementation is like so:
example_relationship = validated_data.pop(‘example_relationship’) instance = ExampleModel.objects.create(**validated_data) instance.example_relationship = example_relationship return instance
The default implementation also does not handle nested relationships. If you want to support writable nested relationships you’ll need to write an explicit .create() method.
- class django_e2ee.serializers.MasterKeySecretSerializer(*args, **kwargs)
Bases:
ModelSerializerA serialializer for
e2ee.MasterKeySecret.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 Meta
Bases:
objectAttributes:
Models:
alias of
MasterKeySecret- fields = ['identifier', 'secret', 'signing_secret', 'salt', 'iv', 'uuid']
- model
alias of
MasterKeySecretMiscellaneous:DoesNotExistMultipleObjectsReturnedModel Fields:
identifierA wrapper for a deferred-loading field.
ivA wrapper for a deferred-loading field.
master_keyAccessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
saltA wrapper for a deferred-loading field.
secretA wrapper for a deferred-loading field.
signing_secretA wrapper for a deferred-loading field.
uuidA wrapper for a deferred-loading field.
Attributes:
master_key_idobjects
- 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:
return ExampleModel.objects.create(**validated_data)
If there are many to many fields present on the instance then they cannot be set until the model is instantiated, in which case the implementation is like so:
example_relationship = validated_data.pop(‘example_relationship’) instance = ExampleModel.objects.create(**validated_data) instance.example_relationship = example_relationship return instance
The default implementation also does not handle nested relationships. If you want to support writable nested relationships you’ll need to write an explicit .create() method.
- class django_e2ee.serializers.MasterKeySerializer(*args, **kwargs)
Bases:
ModelSerializerA serialializer for
e2ee.MasterKey.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 Meta
Bases:
objectAttributes:
Models:
alias of
MasterKey- fields = ['pubkey', 'signing_pubkey', 'user']
- model
alias of
MasterKeyMiscellaneous:DoesNotExistMultipleObjectsReturnedAttributes:
encryptionkey_setAccessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
encryptionkeysecret_setAccessor to the related objects manager on the reverse side of a many-to-one relation.
masterkeysecret_setAccessor to the related objects manager on the reverse side of a many-to-one relation.
objectspubkey_loadedThe pubkey loaded via cryptography
sessionkey_setAccessor to the related objects manager on the reverse side of a many-to-one relation.
signed_secretsAccessor to the related objects manager on the reverse side of a many-to-one relation.
signing_pubkey_loadedThe pubkey loaded via cryptography
user_idModel Fields:
pubkeyA wrapper for a deferred-loading field.
signing_pubkeyA wrapper for a deferred-loading field.
userAccessor to the related object on the forward side of a one-to-one relation.
- read_only_fields = ['user']
- 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:
return ExampleModel.objects.create(**validated_data)
If there are many to many fields present on the instance then they cannot be set until the model is instantiated, in which case the implementation is like so:
example_relationship = validated_data.pop(‘example_relationship’) instance = ExampleModel.objects.create(**validated_data) instance.example_relationship = example_relationship return instance
The default implementation also does not handle nested relationships. If you want to support writable nested relationships you’ll need to write an explicit .create() method.
- class django_e2ee.serializers.SessionKeySerializer(*args, **kwargs)
Bases:
ModelSerializerA serialializer for
e2ee.SessionKey.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 Meta
Bases:
objectAttributes:
Models:
alias of
SessionKey- fields = ['session', 'session_secret', 'secret', 'signing_secret', 'iv', 'ignore']
- model
alias of
SessionKeyMiscellaneous:DoesNotExistMultipleObjectsReturnedMethods:
get_absolute_url()Model Fields:
ignoreA wrapper for a deferred-loading field.
ivA wrapper for a deferred-loading field.
master_keyAccessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
secretA wrapper for a deferred-loading field.
sessionAccessor to the related object on the forward side of a one-to-one relation.
session_secretA wrapper for a deferred-loading field.
signing_secretA wrapper for a deferred-loading field.
Attributes:
master_key_idobjectssession_id
- read_only_fields = ['session']
- 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:
return ExampleModel.objects.create(**validated_data)
If there are many to many fields present on the instance then they cannot be set until the model is instantiated, in which case the implementation is like so:
example_relationship = validated_data.pop(‘example_relationship’) instance = ExampleModel.objects.create(**validated_data) instance.example_relationship = example_relationship return instance
The default implementation also does not handle nested relationships. If you want to support writable nested relationships you’ll need to write an explicit .create() method.