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

Poem OpenAPI Cookie SecurityScheme ignores provided key_name #796

Open
lewisrb opened this issue Apr 3, 2024 · 0 comments
Open

Poem OpenAPI Cookie SecurityScheme ignores provided key_name #796

lewisrb opened this issue Apr 3, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@lewisrb
Copy link

lewisrb commented Apr 3, 2024

Expected Behavior

When a key_name is provided for a given cookie SecurityScheme, then the session token should be returned in the cookie with the provided name.
E.g.
The below should result in a cookie named session being populated with the expected session token.

#[derive(SecurityScheme)]
#[oai(ty = "api_key", key_in = "cookie", key_name = "session")]
struct CookieAuth(ApiKey);

Actual Behavior

The session token is always returned in the cookie poem-session.

Steps to Reproduce the Problem

  1. Use a cookie-based SecurityScheme with a provided key_name.
  2. Authenticate with a login/auth endpoint.
  3. Observe returned cookies.

Specifications

  • Version: poem v2.0.1, poem-openapi v4.0.1
@lewisrb lewisrb added the bug Something isn't working label Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant