github lestrrat-go/jwx v1.2.2

latest releases: v1.2.29, v2.0.21, v2.0.20...
2 years ago
v1.2.2 13 Jul 2021
[Deprecation notice]
  * `(jwe.Message).Decrypt()` will be removed from the API upon the next
    major release.

[Bug Fixes]
  * `jwe.Decrypt` and `(jwe.Message).Decrypt()` failed to decrypt even
    with the correct message contents when used along with `jwe.RegisterCustomField`

[New features]
  JWX
  * Add GuessFormat() function to guess what the payload is.

  JWT
  * Options `jwt.WithMinDelta()`, `jwt.WithMaxDelta()` have been added.
    These can be used to compare time-based fields in the JWT object.
  * Option `jwt.WithRequiredClaim()` has been added. This can be used
    to check that JWT contains the given claim.
  * `jwt.Parse` now understands payloads that have been encrypted _and_ signed.
    This is more in line with the RFC than the previous implementation, but
    due to the fact that it requires a couple of extra unmarshaling, it may
    add some amount of overhead.
  * `jwt.Serializer` has been added as an easy wrapper to perform multiple
     levels of serializations (e.g. apply JWS, then JWE)

  JWE
  * Option `jwe.WithMessage()` has been added. This allows the user to
    obtain both the decrypted payload _and_ the raw `*jwe.Message` in one
    go when `jwe.Decrypt()` is called
  * Option `jwe.WithPostParser()`, along with `jwe.PostParser` and `jwe.PostParseFunc`
    has been added. This allows advanced users to hook into the `jwe.Decrypt()`
    process. The hook is called right after the JWE message has been parsed,
    but before the actual decryption has taken place.
  * `(jwe.Message).Decrypt()` has been marked for deprecation in a next major release.

  JWS
  * Option `jwe.WithMessage()` has been added. This allows the user to
    obtain both the verified payload _and_ the raw `*jws.Message` in one
    go when `jws.Verify()` is called
  * Options to `jws.Sign()` are not of type `jws.SignOption`. There should be
    no user-visible effects unless you were storing these somewhere.

Don't miss a new jwx release

NewReleases is sending notifications on new releases.