Skip to content

Return a JSON Web Token instead of the hash #22

Closed

Description

@julienw

The first implementation of the server will use the same mechanism as the Python server: it computes a sha1 hash of the uploaded content and send it back after the upload has succeeded.

Instead we should return a JSON Web Token that the uploader could keep to act on the uploaded data later on.

The payload could be { token: XXXX } where token is the name of the path in cloud storage, and also the URL in /public URLs. It's currently a hash of the content but this will likely change.

Also this JWT shouldn't expire earlier than the data -- currently the data does not expire so the JWT should never expire.

Lastly in this issue we should provide a CLI tool to extract the token from the JWT (without validating it). From my light research I think this should be done with a Python script that has all the necessary utils to do it without installing extra packages, especially: base64 decoding, and JSON parsing.

Activity

  1. julienw commented on Feb 27, 2020

    @julienw
    ContributorAuthor

    Fixed by #41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Jira

    None yet

    Severity

    None yet

    Estimate

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions