Versions in this module Expand all Collapse all v1 v1.1.0 Feb 22, 2024 v1.0.0 Nov 17, 2023 Changes in this version + var ErrInvalidKey = errors.New("invalid JWK") + func GetED25519PublicKey(jwk *jws.JWK) (ed25519.PublicKey, error) + func IsCompactJWS(s string) bool + func VerifySignature(jwk *jws.JWK, signature, msg []byte) error + type JSONWebSignature struct + Payload []byte + ProtectedHeaders jws.Headers + UnprotectedHeaders jws.Headers + func NewJWS(protectedHeaders, unprotectedHeaders jws.Headers, payload []byte, ...) (*JSONWebSignature, error) + func ParseJWS(jwsStr string, opts ...ParseOpt) (*JSONWebSignature, error) + func VerifyJWS(jwsStr string, jwk *jws.JWK, opts ...ParseOpt) (*JSONWebSignature, error) + func (s JSONWebSignature) SerializeCompact(detached bool) (string, error) + func (s JSONWebSignature) Signature() []byte + type JWK struct + Crv string + Kty string + func (j *JWK) MarshalJSON() ([]byte, error) + func (j *JWK) PublicKeyBytes() ([]byte, error) + func (j *JWK) UnmarshalJSON(jwkBytes []byte) error + type ParseOpt func(opts *jwsParseOpts) + func WithJWSDetachedPayload(payload []byte) ParseOpt + type Signer interface + Headers func() jws.Headers + Sign func(data []byte) ([]byte, error)