mirror of
https://github.com/j93es/oauth-backend.git
synced 2026-06-04 06:31:51 +09:00
Refactor code structure for improved readability and maintainability
This commit is contained in:
commit
60af190524
8 changed files with 1129 additions and 0 deletions
16
addon/init.py
Normal file
16
addon/init.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
from mitmproxy import http
|
||||
import asyncio
|
||||
from pkce_check import PKCEDowngradeChecker
|
||||
|
||||
class PKCEAddon:
|
||||
def __init__(self):
|
||||
self.checker = PKCEDowngradeChecker()
|
||||
|
||||
async def request(self, flow: http.HTTPFlow):
|
||||
print(f"[DEBUG] Processing request: {flow.request.method} {flow.request.pretty_url}")
|
||||
try:
|
||||
await self.checker.test(flow)
|
||||
except Exception as e:
|
||||
print(f"[ERROR] Addon failed: {e}")
|
||||
|
||||
addons = [PKCEAddon()]
|
||||
Loading…
Add table
Add a link
Reference in a new issue