Skip to content

Commit

Permalink
chore (auth): Enhance token handling and security
Browse files Browse the repository at this point in the history
Increased rate limit: The default rate limit for API requests has been increased from 10 to 30 requests per minute.

Improved debugging for token caching (which is not working as of this commit).

Error handling in the authentication module has been improved for better logging and debugging.

Refactoring for better readability and maintainability.
  • Loading branch information
joshschmelzle committed Jan 16, 2025
1 parent b8c96e7 commit 2bc10c9
Show file tree
Hide file tree
Showing 3 changed files with 208 additions and 113 deletions.
2 changes: 1 addition & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
wlanpi-core (2.0.0~dev20250115.2) unstable; urgency=high
wlanpi-core (2.0.0~dev20250115.3) unstable; urgency=high

* Development build towards 2.0.0
* Breaking auth changes
Expand Down
2 changes: 1 addition & 1 deletion wlanpi_core/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def create_app(debug: bool = False):
)

# setup slowapi
limiter = Limiter(key_func=get_remote_address, default_limits=["10/minute"])
limiter = Limiter(key_func=get_remote_address, default_limits=["30/minute"])
app.state.limiter = limiter
app.add_exception_handler(RateLimitExceeded, _rate_limit_exceeded_handler)
app.add_middleware(SlowAPIMiddleware)
Expand Down
Loading

0 comments on commit 2bc10c9

Please sign in to comment.