Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How does it compare to https://github.com/tanmaykm/JWTs.jl #20

Open
schlichtanders opened this issue Mar 26, 2023 · 1 comment
Open

Comments

@schlichtanders
Copy link

need to choose between this package and JWTs.jl

can you tell what is the difference?

@JBlaschke
Copy link

I think one of the main differences is the workflow: JWTs.jl wants a URI (either on a server or a file) to a json payload containing the private key params. This has the format of a list of keys with key IDs (kid field in the json structure). JWTs.jl then references those keys by kid.

JSONWebTokens.jl on the other hand constructs encoding objects from files (e.g. RSA requires a file in .pem format). Encoding / signing then happens by passing the encoding object together with the payload.

If you take a look here:

Then you can see that -- at least for RSA -- they do the same.

Personally I think that JSONWebTokens.jl's workflow is less clumsy (i.e. I don't have to specify a URI to a list of keys, and fetch those keys, and keep track of their IDs). With JSONWebTokens.jl I simply generate an encoding object from a file -- and this encoding object can then be passed around. I would love to add the ability to ingest JSON-formatted keys to JSONWebTokens.jl though, as the server I work with doesn't generate .pem formatted keys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants