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

✨ » Guard config #45

Open
lucas-labs opened this issue Oct 12, 2024 · 0 comments
Open

✨ » Guard config #45

lucas-labs opened this issue Oct 12, 2024 · 0 comments
Assignees
Labels
🐛 bug Something isn't working ✨ enhancement A change to improve the library

Comments

@lucas-labs
Copy link
Owner

lucas-labs commented Oct 12, 2024

Similar to how pydantic's config works, we could have an optional GuardConfig class that could be used to configure the behavior of the guard. This will allow us to get rid of the **depends parameter in the use_guard decorator and make it a guard class-level configuration instead. Or maybe we could have both (per-route and per-guard config). To do so, we would have to make Guard an ABC instead of a Protocol and add a config attribute to it.

Automatically Extracted from:

# TODO: Guard config
# Similar to how **pydantic's config** works, we could have an optional `GuardConfig` class
# that could be used to configure the behavior of the guard.
# This will allow us to get rid of the `**depends` parameter in the `use_guard` decorator
# and make it a guard class-level configuration instead. Or maybe we could have both
# (per-route and per-guard config). To do so, we would have to make Guard an `ABC` instead of
# a `Protocol` and add a `config` attribute to it.

@lucas-labs lucas-labs added the ✨ enhancement A change to improve the library label Oct 12, 2024
@lucas-labs lucas-labs self-assigned this Oct 12, 2024
@lucas-labs lucas-labs pinned this issue Jan 19, 2025
@lucas-labs lucas-labs unpinned this issue Jan 19, 2025
@lucas-labs lucas-labs added the 🐛 bug Something isn't working label Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working ✨ enhancement A change to improve the library
Projects
None yet
Development

No branches or pull requests

1 participant