Skip to content
This repository has been archived by the owner on Oct 9, 2020. It is now read-only.

Migrating to actix-web 2.0 #13

Closed
alfonso-eusebio opened this issue Dec 22, 2019 · 4 comments
Closed

Migrating to actix-web 2.0 #13

alfonso-eusebio opened this issue Dec 22, 2019 · 4 comments

Comments

@alfonso-eusebio
Copy link

Hi @svartalf,

I was using this crate on a personal project that I'm trying to move to actix-web 2.0. Since I didn't want to reinvent the wheel (and probably don't have enough experience) I thought I'd try to migrate actix-web-httpauth to the new version.

After much trial and error I managed to get something that compiles (huge milestone for me), and it actually even works when used inside my (very basic) project!
(Note: The stress is in "trial and error"; you won't necessarily find best practices applied here.)

I didn't migrate the tests, and my project only uses Basic auth (not Bearer), so there might be issues lurking in there. In any case, I wanted to check if this initial "migration" would be of interest to you in order to kick-start the next "official" version of actix-web-httpauth, compatible with actix-web 2.0.

You can see my changes in this branch. If you think it's worth progressing, I could spend some more time on the tests and then create a PR.

Cheers,
Alfonso

@nishtahir
Copy link

@alfonso-eusebio I'm using this on a personal project as well and also migrating to 2.0. I'm not a maintainer on the project but just wanted to mention that the work you are doing could benefit the community as well 😄

@alfonso-eusebio
Copy link
Author

Thanks @nishtahir,

Feel free to use the version from my branch mentioned above. It's not as simple as adding a crate dependency but if you clone/download the repo and configure the local path for the dependency it should work.

Since @fafhrd91 has just released version 2.0.0 of actix-web I thought it'd be a good opportunity to upgrade the version in my branch and make sure that cargo test runs and completes in my migrated code. I just committed the update.

Let's see if at some point we can get this (or a different/improved version) into the main repo and the crate.

@nishtahir
Copy link

@alfonso-eusebio Thanks for your work on this 🎉

@JohnTitor
Copy link
Member

Fixed by #14, I'm going to close this. Thanks for the report!

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

No branches or pull requests

3 participants