TBD54566975 / web5-go

Apache License 2.0
6 stars 6 forks source link

Add SignerDID to `jwt.Decoded` #146

Open tomdaffurn opened 2 months ago

tomdaffurn commented 2 months ago

jws.Decoded has a field to expose the signer's DID. jwt.Decoded should add the same field. This allows verifiers to make assertions about the JWT issuer.

jwt/jwt.go

// Decoded is a compact JWT decoded into its parts
type Decoded struct {
    Header    Header
    Claims    Claims
    Signature []byte
    Parts     []string
+   SignerDID _did.DID
}