func parseSignedFull(input string) (*JsonWebSignature, error) {
	var parsed rawJsonWebSignature
	err := UnmarshalJSON([]byte(input), &parsed)
	if err != nil {
		return nil, err
	}
	return parsed.sanitized()
}
parseSignedFull parses a message in full format.
package jose
import (
	"fmt"
	"strings"
)
type rawJsonWebSignature struct {
	Payload    *byteBuffer        `json:"payload,omitempty"`
	Signatures []rawSignatureInfo `json:"signatures,omitempty"`
	Protected  *byteBuffer        `json:"protected,omitempty"`
	Header     *rawHeader         `json:"header,omitempty"`
	Signature  *byteBuffer        `json:"signature,omitempty"`
}
type rawSignatureInfo struct {
	Protected *byteBuffer `json:"protected,omitempty"`
	Header    *rawHeader  `json:"header,omitempty"`
	Signature *byteBuffer `json:"signature,omitempty"`
}
type JsonWebSignature struct {
	payload    []byte
	Signatures []Signature
}
type Signature struct {
	Header JoseHeader
	Signature []byte
	protected *rawHeader
	header    *rawHeader
	original  *rawSignatureInfo
}
func ParseSigned(input string) (*JsonWebSignature, error) {
	input = stripWhitespace(input)
	if strings.HasPrefix(input, "{") {
		return parseSignedFull(input)
	}
	return parseSignedCompact(input)
}
func (sig Signature) mergedHeaders() rawHeader {
	out := rawHeader{}
	out.merge(sig.protected)
	out.merge(sig.header)
	return out
}
func (obj JsonWebSignature) computeAuthData(signature *Signature) []byte {
	var serializedProtected string
	if signature.original != nil && signature.original.Protected != nil {
		serializedProtected = signature.original.Protected.base64()
	} else if signature.protected != nil {
		serializedProtected = base64URLEncode(mustSerializeJSON(signature.protected))
	} else {
		serializedProtected = ""
	}
	return []byte(fmt.Sprintf("%s.%s",
		serializedProtected,
		base64URLEncode(obj.payload)))
}