starlinglab / integrity-backend

Backend server for registering and configurable processing of authenticated assets in the Starling Integrity framework.
MIT License
10 stars 3 forks source link

Content metadata proofmode #99

Closed benhylau closed 2 years ago

benhylau commented 2 years ago

This adds the contentMetadata container to bring us back to spec. It also take copyright and author from content (instead of action config).

I am also making the parsing more robust to missing fields, such as copyright. GPS however is still required.

I forget if we need to do something about the Z to not falsely signify UTC when we only know local time?

    gps_time = (
        datetime.utcfromtimestamp(
            int(proofmode_data["proofs"][0]["Location.Time"]) / 1000
        ).isoformat()
        + "Z"
    )