Versions in this module Expand all Collapse all v1 v1.0.1 Aug 26, 2024 Changes in this version + const AlgA128GCMKW + const AlgA128KW + const AlgA192GCMKW + const AlgA192KW + const AlgA256GCMKW + const AlgA256KW + const AlgDir + const AlgECDHES + const AlgECDHESA128KW + const AlgECDHESA192KW + const AlgECDHESA256KW + const AlgES256 + const AlgES384 + const AlgES512 + const AlgHS256 + const AlgHS384 + const AlgHS512 + const AlgNone + const AlgPBES2HS256A128KW + const AlgPBES2HS384A192KW + const AlgPBES2HS512A256KW + const AlgPS256 + const AlgPS384 + const AlgPS512 + const AlgRS256 + const AlgRS384 + const AlgRS512 + const AlgRSA15 + const AlgRSAOAEP + const AlgRSAOAEP256 + const EncA128CBCHS256 + const EncA128CBCHS384 + const EncA128GCM + const EncA192GCM + const EncA256CBCHS512 + const EncA256GCM + const HeaderKeyAlgorithm + const HeaderKeyID + const HeaderMediaType + type Claims map[string]interface + func (c Claims) Add(name string, value interface{}) + func (c Claims) Float64Claim(name string) (float64, bool, error) + func (c Claims) Int64Claim(name string) (int64, bool, error) + func (c Claims) StringClaim(name string) (string, bool, error) + func (c Claims) StringsClaim(name string) ([]string, bool, error) + func (c Claims) TimeClaim(name string) (time.Time, bool, error) + type JOSEHeader map[string]string + func (j JOSEHeader) Validate() error + type JWK struct + Alg string + Exponent int + ID string + Modulus *big.Int + Secret []byte + Type string + Use string + func (j *JWK) MarshalJSON() ([]byte, error) + func (j *JWK) UnmarshalJSON(data []byte) error + type JWKSet struct + Keys []JWK + type JWS struct + Header JOSEHeader + Payload []byte + RawHeader string + RawPayload string + Signature []byte + func ParseJWS(raw string) (JWS, error) + type JWT JWS + func NewJWT(header JOSEHeader, claims Claims) (jwt JWT, err error) + func NewSignedJWT(claims Claims, s Signer) (*JWT, error) + func ParseJWT(token string) (jwt JWT, err error) + func (j *JWT) Claims() (Claims, error) + func (j *JWT) Data() string + func (j *JWT) Encode() string + func (j *JWT) KeyID() (string, bool) + type Signer interface + Sign func(data []byte) (sig []byte, err error) + type SignerRSA struct + PrivateKey rsa.PrivateKey + func NewSignerRSA(kid string, key rsa.PrivateKey) *SignerRSA + func (s *SignerRSA) Sign(data []byte) ([]byte, error) + type Verifier interface + Alg func() string + ID func() string + Verify func(sig []byte, data []byte) error + func NewVerifier(jwk JWK) (Verifier, error) + type VerifierRSA struct + Hash crypto.Hash + KeyID string + PublicKey rsa.PublicKey + func NewVerifierRSA(jwk JWK) (*VerifierRSA, error) + func (v *VerifierRSA) Alg() string + func (v *VerifierRSA) ID() string + func (v *VerifierRSA) Verify(sig []byte, data []byte) error