Skip to content

JWS: Does the General vs. Flattened format make sense? #25

Description

@tgross35

The current representation is as follows:

pubenumJws{General(General),Flattened(Flattened),}pubstructGeneral{pubpayload:Option<Bytes>,pubsignatures:Vec<Signature>,}pubstructFlattened{pubpayload:Option<Bytes>,pubsignature:Signature,}

It seems a bit unusual to define general vs. flattened at the top level since it's only relevant for signatures. It seems like maybe something like this would work a bit better:

pubenumJws{pub payload:Option<Bytes>,pub signatures:SomeSignatureEnum,}enumSomeSignatureEnum{Flattened(Signature),General(Vec<Signature>)}

And this would at least make it easier to work with payload without needing to branch on General/Flattened.

Just curious what thoughts are here

Related: #22

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions