Narrows type of jws.Payload type from any to []byte
Rationale
The current implementation naively attempts to json.Marshal payload but it's not always the case that the payload being signed will be or should be json serializable. e.g. payload for tbdex message signatures is a sha256 digest. Further, the jws rfc considers payload to be a sequence of octets.
Summary
Narrows type of
jws.Payload
type fromany
to[]byte
Rationale
The current implementation naively attempts to
json.Marshal
payload but it's not always the case that the payload being signed will be or should be json serializable. e.g. payload for tbdex message signatures is a sha256 digest. Further, the jws rfc considers payload to be a sequence of octets.Reference