Fix method equality to be able to validate a JWT

Fix method equality for being abile to validate a JWT parsed from JWS
token.
Comparing the two SigningMethod interfaces produce false negative for
the most of the cases where a token is received over th wire and it has
to be parsed to JWT from a JWS as so far there isn't any other way; the
equality fails because the types which implements the interface are
defined on pointers, hence they cannot be assigned to type values and do
a comparison over the values, and the addresses never will be the same
because the one assigned to the internal field of the JWS values is one
that it's not exposed, so a new one SigningMethod (pointer) must be
provided to the `Validate`, provoking that the condition always fails
1 file changed
tree: 59b9057861dde33c4a0497f58ea6553c8d184956
  1. crypto/
  2. jws/
  3. jwt/
  4. .gitignore
  5. .tags
  6. .travis.yml
  7. _test.sh
  8. base64.go
  9. base64_test.go
  10. doc.go
  11. header.go
  12. header_test.go
  13. LICENSE
  14. README.md
  15. stubs_test.go
README.md

JOSE

Build Status GoDoc

JOSE is a comprehensive set of JWT, JWS, and JWE libraries.

Why

The only other JWS/JWE/JWT implementations are specific to JWT, and none were particularly pleasant to work with.

These libraries should provide an easy, straightforward way to securely create, parse, and validate JWS, JWE, and JWTs.

Notes:

JWE is currently unimplemented.

Version 0.9:

Documentation

The docs can be found at [godoc.org] docs, as usual.

JWS RFC

JWE RFC

JWT RFC

License

[MIT] license.