commonHeader property
JoseHeader
get
commonHeader
The JOSE header
In case of multiple recipients, this header is composed of the shared header parameters and the per-recipient header parameters that are common. In case of a single recipient, this contains all header parameters.
Implementation
JoseHeader get commonHeader {
var sharedHeader = safeUnion(
[sharedProtectedHeader?.toJson(), sharedUnprotectedHeader?.toJson()]);
return JoseHeader.fromJson(commonUnion(recipients.map((r) => safeUnion([
sharedHeader,
r.protectedHeader?.toJson(),
r.unprotectedHeader?.toJson()
]))));
}