ToastShaman / dropwizard-auth-jwt

A Dropwizard authentication filter using JSON Web Token (JWT)
Apache License 2.0
116 stars 50 forks source link

Use pre-existing library for JWTs? #21

Closed JoakimLofgren closed 8 years ago

JoakimLofgren commented 8 years ago

It could be nice to use jose4j or some other library mentioned on the jwt.io page ?

ToastShaman commented 8 years ago

Hi, that's a very good idea! I've tried jjwt before and quite liked it. Probably worth trying to compare the two to see which one fits better. Have you any experience with either of them?

JoakimLofgren commented 8 years ago

I've just used jose4j and can't say I've got any big annoyances with it yet. I used it for generating JWKs and verifying signatures on JWTs, using RsaJsonWebKey based on the JWT examples.

I like to look at number of commits, releases, open issues and pull requests, activity, and such as well when picking a dependency.

As a side note: If I remember correctly, I noticed that your code breaks on the jws.setKeyIdHeaderValue(...) part. So I just omitted that, but it would be nice to use it to identify which key to use when verifying the JWT.

ToastShaman commented 8 years ago

Fixed in v1.0.0-0 release