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

Support for JWT handling #92

Open
GrandChaman opened this issue Sep 9, 2020 · 5 comments
Open

Support for JWT handling #92

GrandChaman opened this issue Sep 9, 2020 · 5 comments
Labels
A-httpauth Project: actix-web-httpauth C-feature Category: new functionality

Comments

@GrandChaman
Copy link

Hi ! First of all, thank you for your amazing work !
I'm planning on adding support for JWT to the actix-web-httpauth crate.
Is this the right place to implement such feature ? Or would it be in another crate ?

Like for the Bearer auth already implemented, the JWT auth would have a config with different settings on how to validate the JWT and a struct wrapped in an Arc<RwLock<>> in which to store, access and hot-replace the JWKS.

An extractor would also be available to extract common header fields as well as common claims. (Maybe find a way to make the claims struct dynamic, so that people could plug-in there own struct for the claims)

This features would require the following crates :

  • jsonwebtoken
  • serde
  • serde_json
  • chrono
@robjtede robjtede added C-feature Category: new functionality A-httpauth Project: actix-web-httpauth labels Sep 16, 2020
@robjtede robjtede changed the title [Feature] Support for JWT Support for JWT handling Sep 16, 2020
@Chaostheorie
Copy link

Any progress on this? I'm trying to implement JWT with cookies for my current application but would rather use a crate, because it's most likely written by people with more knowledge than me.

This might also provide a good starting point for some new developers instead of using actix-identity to make the entry easier and provide a secure base for applications.

@GrandChaman
Copy link
Author

Unfortunately, I've got side tracked and won't be able to deal with this issue in quite some time

@quentusrex
Copy link

@GrandChaman Did you happen to start a branch with any work in progress code? This feature is now on my radar, and your description looks just like what I'm looking to find(or implement).

@GrandChaman
Copy link
Author

@quentusrex I did start something for one of my final school projects, it's not production ready and needs a lot of rework, but maybe it'll get you started :)

@ted-tanner
Copy link

I might be interested in working on this at some point. I've implemented JWTs multiple times and know how to avoid pitfalls. However, for the next few months I will be very busy and likely won't get around to it. But I am willing to help/answer questions for anyone who does choose to work on it, if need be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-httpauth Project: actix-web-httpauth C-feature Category: new functionality
Projects
None yet
Development

No branches or pull requests

5 participants