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

Added JWK and JWKS support #97

Merged
merged 15 commits into from Oct 23, 2019
Merged

Added JWK and JWKS support #97

merged 15 commits into from Oct 23, 2019

Conversation

valeriomazzeo
Copy link
Contributor

@valeriomazzeo valeriomazzeo commented Nov 23, 2018

This pull request adds support for JWK and JWKS.
It fixes #87

Note: only RSA keys have been implemented so far.

@valeriomazzeo valeriomazzeo mentioned this pull request Nov 23, 2018
@dehlen
Copy link

dehlen commented Jun 19, 2019

Is there anything I can do this get this PR merged? I would love to see this integrated, however the PR is open already half a year.

@valeriomazzeo
Copy link
Contributor Author

@tanner0101 tanner0101 added the enhancement New feature or request label Jun 19, 2019
Copy link
Member

@tanner0101 tanner0101 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for missing this earlier, we should consider adding JWK support to the next major release (currently in alpha).

The module has been renamed from JWT to JWTKit, so these files must be moved. Besides that, it seems like everything here should work against the latest version on master.


class JWKTests: XCTestCase {

static let allTests = [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of supplying an allTests array, just run swift test --generate-linuxmain before committing.

@tanner0101 tanner0101 added this to In Progress in Vapor 4 via automation Jun 19, 2019
@dehlen
Copy link

dehlen commented Jun 19, 2019

Great to see things coming along. I am currently using a fork for this to work and love to be able to use the stable version here with the next release. Again I am not the author of the pull request but if there is anything I can help with...

@vzsg
Copy link
Member

vzsg commented Jun 20, 2019

@tanner0101 as this PR was for 3.0, why not merge it there and release it as 3.1.0?

@tanner0101
Copy link
Member

tanner0101 commented Jun 20, 2019

@vzsg we definitely could. It's currently targeted at master which is 4.0, but I'd be happy to merge into branch 3 as well. Of course, if we do merge into 3.0, we should also add it to 4.0 at the same time.

Looking at Swift at least, they usually merge things into master (unstable), then cherry pick to the respective stable versions they would like to support.

@vzsg
Copy link
Member

vzsg commented Jun 20, 2019

Well, back in November 2018 when this PR was opened, master was still 3.0 :)
But I'm happy with this approach.

@valeriomazzeo
Copy link
Contributor Author

@tanner0101 be careful when merging into master or 3. This commit vapor/jwt-kit@fb65262 has removed the additional tests execution.

@grosch
Copy link
Contributor

grosch commented Sep 8, 2019

@tanner0101 is this going to be merged into master soon?

@amkomatz
Copy link

@tanner0101 Any update on this PR? Starting development on a major application, and we could really use this :)

@valeriomazzeo
Copy link
Contributor Author

@amkomatz the content of this pull request is included in https://github.com/asensei/vapor-auth-jwt

We've been using this since Vapor 2.

@tanner0101 tanner0101 added this to In Progress in Vapor 3 via automation Oct 23, 2019
@tanner0101 tanner0101 changed the base branch from master to 3 October 23, 2019 01:06
@tanner0101 tanner0101 changed the base branch from 3 to 3-jwks October 23, 2019 01:08
@tanner0101
Copy link
Member

Merging this into 3-jwks branch so that we can have a local branch to test a merge into 3

@tanner0101 tanner0101 merged commit 37eb270 into vapor:3-jwks Oct 23, 2019
Vapor 4 automation moved this from In Progress to Done Oct 23, 2019
@tanner0101 tanner0101 mentioned this pull request Oct 23, 2019
@tanner0101
Copy link
Member

Update on the situation here: vapor/jwt-kit#105 (comment)

@valeriomazzeo
Copy link
Contributor Author

I have reverted that master merge. This is the PR as it was originally intended for Vapor 3 vapor/jwt-kit#106 .

Just as a reminder I had already implemented this for Vapor 2, but for whatever reason it wasn't ported to Vapor 3.

It would be nice if you could please incorporate this feature also in the master branch, for Vapor 4. Otherwise I will have to re-implement it once again :(

@tanner0101
Copy link
Member

Added in JWT 3.1.0, thanks @valeriomazzeo! https://github.com/vapor/jwt-kit/releases/tag/3.1.0

@tanner0101
Copy link
Member

JWK added to master branch here: vapor/jwt-kit#107

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Vapor 4
  
Done
Vapor 3
  
In Progress
Development

Successfully merging this pull request may close these issues.

None yet

8 participants