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

[Feature Request] Support actix_web_httpauth #479

Open
mike-lloyd03 opened this issue Nov 6, 2022 · 0 comments
Open

[Feature Request] Support actix_web_httpauth #479

mike-lloyd03 opened this issue Nov 6, 2022 · 0 comments

Comments

@mike-lloyd03
Copy link

mike-lloyd03 commented Nov 6, 2022

I am trying to use the BearerAuth extractor from actix_web_httpauth. However, using this in a service like so:

#[api_v2_operation(tags("Users"))]
#[get("/users")]
async fn get_all(
    pool: web::Data<PgPool>,
    token: BearerAuth,
) -> Result<Json<Vec<User>>, Error> {
    println!("{:?}", token);
    route::get_all::<User>(pool).await
}

Raises errors stating that the following functions are not implemented by BearerAuth:

  • update_definitions
  • update_security_definitions
  • update_security
  • update_parameter

I believe this would be solved by implementing OperationModifier on BearerAuth (and probably BasicAuth as well) similar to what was done with #232.

Please consider adding this support if possible. Thank you.

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

1 participant