Versions in this module Expand all Collapse all v0 deprecated v0.9.1 Dec 6, 2021 Changes in this version + const AlgorithmKey + const ContentTypeKey + const CriticalKey + const JWKKey + const JWKSetURLKey + const KeyIDKey + const TypeKey + const X509CertChainKey + const X509CertThumbprintKey + const X509CertThumbprintS256Key + const X509URLKey + var DefaultJWKAcceptor = JWKAcceptFunc(func(key jwk.Key) bool { ... }) + func Sign(payload []byte, alg jwa.SignatureAlgorithm, key interface{}, options ...Option) ([]byte, error) + func SignMulti(payload []byte, options ...Option) ([]byte, error) + func SplitCompact(rdr io.Reader) ([]byte, []byte, []byte, error) + func Verify(buf []byte, alg jwa.SignatureAlgorithm, key interface{}) (ret []byte, err error) + func VerifyWithJKU(buf []byte, jwkurl string) ([]byte, error) + func VerifyWithJWK(buf []byte, key jwk.Key) (payload []byte, err error) + func VerifyWithJWKSet(buf []byte, keyset *jwk.Set, keyaccept JWKAcceptFunc) (payload []byte, err error) + type EncodedMessage struct + Payload string + Signatures []*EncodedSignature + type EncodedMessageUnmarshalProxy struct + Payload string + Signatures []*EncodedSignatureUnmarshalProxy + type EncodedSignature struct + Headers Headers + Protected string + Signature string + type EncodedSignatureUnmarshalProxy struct + Headers *StandardHeaders + Protected string + Signature string + type FullEncodedMessage struct + type FullEncodedMessageUnmarshalProxy struct + type Headers interface + Algorithm func() jwa.SignatureAlgorithm + ContentType func() string + Critical func() []string + Get func(string) (interface{}, bool) + JWK func() jwk.Key + JWKSetURL func() string + KeyID func() string + Set func(string, interface{}) error + Type func() string + X509CertChain func() []string + X509CertThumbprint func() string + X509CertThumbprintS256 func() string + X509URL func() string + type JWKAcceptFunc func(jwk.Key) bool + func (f JWKAcceptFunc) Accept(key jwk.Key) bool + type JWKAcceptor interface + Accept func(jwk.Key) bool + type Message struct + func Parse(src io.Reader) (m *Message, err error) + func ParseString(s string) (*Message, error) + func (m Message) LookupSignature(kid string) []*Signature + func (m Message) Payload() []byte + func (m Message) Signatures() []*Signature + type Option = option.Interface + func WithHeaders(h Headers) Option + func WithPretty(b bool) Option + func WithSigner(signer sign.Signer, key interface{}, public, protected Headers) Option + type PayloadSigner interface + Algorithm func() jwa.SignatureAlgorithm + ProtectedHeader func() Headers + PublicHeader func() Headers + Sign func([]byte) ([]byte, error) + type Signature struct + func (s Signature) ProtectedHeaders() Headers + func (s Signature) PublicHeaders() Headers + func (s Signature) Signature() []byte + type StandardHeaders struct + func (h *StandardHeaders) Algorithm() jwa.SignatureAlgorithm + func (h *StandardHeaders) ContentType() string + func (h *StandardHeaders) Critical() []string + func (h *StandardHeaders) Get(name string) (interface{}, bool) + func (h *StandardHeaders) JWK() jwk.Key + func (h *StandardHeaders) JWKSetURL() string + func (h *StandardHeaders) KeyID() string + func (h *StandardHeaders) Set(name string, value interface{}) error + func (h *StandardHeaders) Type() string + func (h *StandardHeaders) UnmarshalJSON(buf []byte) error + func (h *StandardHeaders) X509CertChain() []string + func (h *StandardHeaders) X509CertThumbprint() string + func (h *StandardHeaders) X509CertThumbprintS256() string + func (h *StandardHeaders) X509URL() string + func (h StandardHeaders) MarshalJSON() ([]byte, error)