Closed KendallWeihe closed 6 months ago
lmk what we think about this idea, I can do that pretty quickly here
maybe we should rename jws.Sign() to something like jws.DIDSign() which builds the header from the given DID document and then we keep a function named jws.Sign() which takes in a header a payload and just does the signing (jws.DIDsign() would call jws.Sign())
@mistermoe I whipped this together kind of in a flash so lmk if I'm totally off base
Originally motivated by the fact that the proof JWT in OID4VCI needs to be explicitly typed with the value
openid4vci-proof+jwt
The premise here being, we added a
Type
property to thejws.Header
type, but the call tojws.Sign()
builds theHeader
dynamically from the relative material from the DID Document... a few thoughts...jws
module, but it's good enoughjws.Sign()
to something likejws.DIDSign()
which builds the header from the given DID document and then we keep a function namedjws.Sign()
which takes in a header a payload and just does the signing (jws.DIDsign()
would calljws.Sign()
)Idk I'm a little out of my depth here so feel free to propose an entirely different direction