Ejemplo n.º 1
0
class VlobListVersionsRepSchema(BaseRepSchema):
    versions = fields.Map(
        fields.Integer(required=True),
        fields.Tuple(fields.DateTime(required=True),
                     DeviceIDField(required=True)),
        required=True,
    )
Ejemplo n.º 2
0
class APIV1_HandshakeAuthenticatedAnswerSchema(BaseSchema):
    handshake = fields.CheckedConstant("answer", required=True)
    type = fields.EnumCheckedConstant(APIV1_HandshakeType.AUTHENTICATED, required=True)
    client_api_version = ApiVersionField(required=True)
    organization_id = OrganizationIDField(required=True)
    device_id = DeviceIDField(required=True)
    rvk = fields.VerifyKey(required=True)
    answer = fields.Bytes(required=True)
Ejemplo n.º 3
0
class VlobReadRepSchema(BaseRepSchema):
    version = fields.Integer(required=True, validate=_validate_version)
    blob = fields.Bytes(required=True)
    author = DeviceIDField(required=True)
    timestamp = fields.DateTime(required=True)
    # This field is used by the client to figure out if its role certificate cache is up-to-date enough
    # to be able to perform the proper integrity checks on the manifest timestamp.
    # The `missing=None` argument is used to provide compatibilty of new clients with old backends.
    # New in API version 2.3 (Parsec 2.6.0)
    author_last_role_granted_on = fields.DateTime(required=False,
                                                  allow_none=True,
                                                  missing=None)
Ejemplo n.º 4
0
class OrganizationBootstrapWebhookSchema(BaseSchema):
    organization_id = OrganizationIDField(required=True)
    device_id = DeviceIDField(required=True)
    device_label = fields.String(allow_none=True, required=True)
    human_email = fields.String(allow_none=True, required=True)
    human_label = fields.String(allow_none=True, required=True)
Ejemplo n.º 5
0
class MessageSchema(BaseSchema):
    count = fields.Integer(required=True)
    sender = DeviceIDField(required=True)
    timestamp = fields.DateTime(required=True)
    body = fields.Bytes(required=True)
Ejemplo n.º 6
0
class APIV1_DeviceClaimReqSchema(BaseReqSchema):
    invited_device_id = DeviceIDField(required=True)
    encrypted_claim = fields.Bytes(required=True)
Ejemplo n.º 7
0
class APIV1_DeviceGetInvitationCreatorReqSchema(BaseReqSchema):
    invited_device_id = DeviceIDField(required=True)
Ejemplo n.º 8
0
class VlobReadRepSchema(BaseRepSchema):
    version = fields.Integer(required=True, validate=_validate_version)
    blob = fields.Bytes(required=True)
    author = DeviceIDField(required=True)
    timestamp = fields.DateTime(required=True)
Ejemplo n.º 9
0
class RealmStatusRepSchema(BaseRepSchema):
    in_maintenance = fields.Boolean(required=True)
    maintenance_type = MaintenanceTypeField(allow_none=True)
    maintenance_started_on = fields.DateTime(required=True, allow_none=True)
    maintenance_started_by = DeviceIDField(required=True, allow_none=True)
    encryption_revision = fields.Integer(required=True)