Versions in this module Expand all Collapse all v0 v0.8.7 May 19, 2021 v0.8.5 Oct 14, 2020 v0.8.4 Oct 9, 2020 v0.8.3 Oct 8, 2020 v0.8.2 Sep 21, 2020 v0.8.1 Sep 9, 2020 v0.8.0 Jul 11, 2020 Changes in this version + const AlgRSAOAEP v0.7.4 Nov 12, 2019 Changes in this version + const AlgA128GCM + const AlgA192GCM + const AlgA256GCM + const AlgDir + const AlgES256 + const AlgES384 + const AlgES512 + const AlgPS256 + const AlgPS384 + const AlgPS512 + const AlgRS256 + const AlgRS384 + const AlgRS512 + const CrvP256 + const CrvP384 + const CrvP521 + const DeflateZip + const EncA128GCM + const EncA192GCM + const EncA256GCM + const JwtType + const KeyOpsDecrypt + const KeyOpsDeriveBits + const KeyOpsDeriveKey + const KeyOpsEncrypt + const KeyOpsSign + const KeyOpsUnwrapKey + const KeyOpsVerify + const KeyOpsWrapKey + const KeyUseEnc + const KeyUseSig + const KtyEC + const KtyOct + const KtyRSA + var ErrBlobEmpty = errors.New("invalid Blob format, may not be empty") + var ErrDuplicateKeyOps = errors.New("duplicate key_ops entries") + var ErrJSONFormat = errors.New("invalid JSON format") + var ErrJweFormat = errors.New("invalid JWE format") + var ErrJwkInconsistentCertificateFields = errors.New("inconsistent certificate fields") + var ErrJwkInvalidFingerprintfomat = errors.New("invalid fingerprint format") + var ErrJwkReservedClaimName = errors.New("incorrect use of reserved claim name") + var ErrJwtFormat = errors.New("invalid JWT format") + var ErrUnexpectedKeyType = errors.New("unexpected key type") + var ErrUnsupportedKeyType = errors.New("unsupported key type") + func MarshalJws(body string, signature []byte) string + type Alg string + type Audiences struct + Aud []string + func (audiences *Audiences) MarshalJSON() (dst []byte, err error) + func (audiences *Audiences) UnmarshalJSON(src []byte) (err error) + type AutomaticJwtClaims struct + IssuedAt int64 + Issuer string + JwtID string + type BigNum struct + func (b *BigNum) Empty() bool + func (b *BigNum) Int() *big.Int + func (b *BigNum) MarshalJSON() (dst []byte, err error) + func (b *BigNum) Set(val *big.Int) *BigNum + func (b *BigNum) SetBytes(val []byte) *BigNum + func (b *BigNum) UnmarshalJSON(src []byte) (err error) + type Blob struct + B []byte + func (b *Blob) Bytes() []byte + func (b *Blob) MarshalJSON() (dst []byte, err error) + func (b *Blob) SetBytes(val []byte) *Blob + func (b *Blob) UnmarshalJSON(src []byte) error + type Certificate struct + Certificate *x509.Certificate + func (c *Certificate) MarshalJSON() (dst []byte, err error) + func (c *Certificate) UnmarshalJSON(src []byte) (err error) + type Crv string + type Enc string + type Fingerprint struct + func (f *Fingerprint) Bytes() []byte + func (f *Fingerprint) MarshalJSON() (dst []byte, err error) + func (f *Fingerprint) SetBytes(val []byte) *Fingerprint + func (f *Fingerprint) UnmarshalJSON(src []byte) error + type Jwe struct + Ciphertext []byte + EncryptedKey []byte + Header JweHeader + Iv []byte + MarshalledHeader []byte + Plaintext []byte + Tag []byte + func (jwe *Jwe) Marshal() string + func (jwe *Jwe) MarshalHeader() (err error) + func (jwe *Jwe) Unmarshal(src string) (err error) + type JweCustomHeaderFields struct + OtherAad *Blob + type JweHeader struct + Enc Enc + Zip Zip + type Jwk interface + Alg func() Alg + CheckConsistency func() error + Kid func() string + Kty func() Kty + Ops func() []KeyOps + SetAlg func(alg Alg) + SetKid func(kid string) + SetOps func(ops []KeyOps) + SetUse func(use KeyUse) + SetX5C func(x5c []*x509.Certificate) + SetX5T func(hash *Fingerprint) + Use func() KeyUse + X5C func() []*x509.Certificate + X5T func() *Fingerprint + func UnmarshalJwk(reader io.ReadSeeker) (jwk Jwk, err error) + type Jwks struct + Keys []Jwk + func (j *Jwks) UnmarshalJSON(data []byte) error + type Jws struct + Header *JwsHeader + Payload interface{} + Signature []byte + func (jws *Jws) Body() (body string, err error) + func (jws *Jws) MarshalBody() (body string, err error) + func (jws *Jws) Unmarshal(src string) (body string, err error) + type JwsHeader struct + Alg Alg + Crit []string + Cty JwsType + Jku string + Kid string + Typ JwsType + X5C [][]byte + X5T *Blob + X5T256 *Blob + X5U string + type JwsType string + type Jwt struct + Claims JwtClaims + Header JwsHeader + Signature []byte + func (jwt *Jwt) MarshalBody() (body string, err error) + func (jwt *Jwt) Unmarshal(src string) (body string, err error) + func (jwt *Jwt) Verify() error + type JwtClaims struct + func (c *JwtClaims) MarshalJSON() (dst []byte, err error) + func (c *JwtClaims) UnmarshalCustomClaim(name string, claim interface{}) error + func (c *JwtClaims) UnmarshalJSON(data []byte) (err error) + type KeyOps string + type KeyUse string + type Kty string + type OctSecretKey struct + func (j *OctSecretKey) Alg() Alg + func (j *OctSecretKey) CheckConsistency() error + func (j *OctSecretKey) Kid() string + func (j *OctSecretKey) Ops() []KeyOps + func (j *OctSecretKey) SetAlg(alg Alg) + func (j *OctSecretKey) SetKid(kid string) + func (j *OctSecretKey) SetOps(ops []KeyOps) + func (j *OctSecretKey) SetUse(use KeyUse) + func (j *OctSecretKey) SetX5C(x5c []*x509.Certificate) + func (j *OctSecretKey) SetX5T(blob *Fingerprint) + func (j *OctSecretKey) Use() KeyUse + func (j *OctSecretKey) X5C() []*x509.Certificate + func (j *OctSecretKey) X5T() *Fingerprint + func (k *OctSecretKey) Kty() Kty + func (k *OctSecretKey) MarshalJSON() (dst []byte, err error) + func (k *OctSecretKey) UnmarshalJSON(src []byte) (err error) + type OctSecretKeyFields struct + K Blob + type PrivateEcKey struct + func (j *PrivateEcKey) Alg() Alg + func (j *PrivateEcKey) CheckConsistency() error + func (j *PrivateEcKey) Kid() string + func (j *PrivateEcKey) Ops() []KeyOps + func (j *PrivateEcKey) SetAlg(alg Alg) + func (j *PrivateEcKey) SetKid(kid string) + func (j *PrivateEcKey) SetOps(ops []KeyOps) + func (j *PrivateEcKey) SetUse(use KeyUse) + func (j *PrivateEcKey) SetX5C(x5c []*x509.Certificate) + func (j *PrivateEcKey) SetX5T(blob *Fingerprint) + func (j *PrivateEcKey) Use() KeyUse + func (j *PrivateEcKey) X5C() []*x509.Certificate + func (j *PrivateEcKey) X5T() *Fingerprint + func (k *PrivateEcKey) Kty() Kty + func (k *PrivateEcKey) MarshalJSON() (dst []byte, err error) + func (k *PrivateEcKey) UnmarshalJSON(src []byte) (err error) + type PrivateEcKeyFields struct + D BigNum + type PrivateRsaKey struct + func (j *PrivateRsaKey) Alg() Alg + func (j *PrivateRsaKey) CheckConsistency() error + func (j *PrivateRsaKey) Kid() string + func (j *PrivateRsaKey) Ops() []KeyOps + func (j *PrivateRsaKey) SetAlg(alg Alg) + func (j *PrivateRsaKey) SetKid(kid string) + func (j *PrivateRsaKey) SetOps(ops []KeyOps) + func (j *PrivateRsaKey) SetUse(use KeyUse) + func (j *PrivateRsaKey) SetX5C(x5c []*x509.Certificate) + func (j *PrivateRsaKey) SetX5T(blob *Fingerprint) + func (j *PrivateRsaKey) Use() KeyUse + func (j *PrivateRsaKey) X5C() []*x509.Certificate + func (j *PrivateRsaKey) X5T() *Fingerprint + func (k *PrivateRsaKey) Kty() Kty + func (k *PrivateRsaKey) MarshalJSON() (dst []byte, err error) + func (k *PrivateRsaKey) UnmarshalJSON(src []byte) (err error) + type PrivateRsaKeyFields struct + D BigNum + Dp BigNum + Dq BigNum + P BigNum + Q BigNum + Qi BigNum + type PublicEcKey struct + func (j *PublicEcKey) Alg() Alg + func (j *PublicEcKey) CheckConsistency() error + func (j *PublicEcKey) Kid() string + func (j *PublicEcKey) Ops() []KeyOps + func (j *PublicEcKey) SetAlg(alg Alg) + func (j *PublicEcKey) SetKid(kid string) + func (j *PublicEcKey) SetOps(ops []KeyOps) + func (j *PublicEcKey) SetUse(use KeyUse) + func (j *PublicEcKey) SetX5C(x5c []*x509.Certificate) + func (j *PublicEcKey) SetX5T(blob *Fingerprint) + func (j *PublicEcKey) Use() KeyUse + func (j *PublicEcKey) X5C() []*x509.Certificate + func (j *PublicEcKey) X5T() *Fingerprint + func (k *PublicEcKey) Kty() Kty + func (k *PublicEcKey) MarshalJSON() (dst []byte, err error) + func (k *PublicEcKey) UnmarshalJSON(src []byte) (err error) + type PublicEcKeyFields struct + Crv Crv + X BigNum + Y BigNum + type PublicRsaKey struct + func (j *PublicRsaKey) Alg() Alg + func (j *PublicRsaKey) CheckConsistency() error + func (j *PublicRsaKey) Kid() string + func (j *PublicRsaKey) Ops() []KeyOps + func (j *PublicRsaKey) SetAlg(alg Alg) + func (j *PublicRsaKey) SetKid(kid string) + func (j *PublicRsaKey) SetOps(ops []KeyOps) + func (j *PublicRsaKey) SetUse(use KeyUse) + func (j *PublicRsaKey) SetX5C(x5c []*x509.Certificate) + func (j *PublicRsaKey) SetX5T(blob *Fingerprint) + func (j *PublicRsaKey) Use() KeyUse + func (j *PublicRsaKey) X5C() []*x509.Certificate + func (j *PublicRsaKey) X5T() *Fingerprint + func (k *PublicRsaKey) Kty() Kty + func (k *PublicRsaKey) MarshalJSON() (dst []byte, err error) + func (k *PublicRsaKey) UnmarshalJSON(src []byte) (err error) + type PublicRsaKeyFields struct + E BigNum + N BigNum + type SettableJwtClaims struct + Audiences Audiences + Expiration int64 + NotBefore int64 + Subject string + type UntypedClaims map[string]json.RawMessage + type Zip string