(authorization: Optional[str])
| 2269 | # ========== Plugin Configuration Endpoints ========== |
| 2270 | |
| 2271 | async def _verify_plugin_connection_token(authorization: Optional[str]) -> None: |
| 2272 | plugin_config = await db.get_plugin_config() |
| 2273 | provided_token = None |
| 2274 | if authorization: |
| 2275 | if authorization.startswith("Bearer "): |
| 2276 | provided_token = authorization[7:] |
| 2277 | else: |
| 2278 | provided_token = authorization |
| 2279 | if not plugin_config.connection_token or provided_token != plugin_config.connection_token: |
| 2280 | raise HTTPException(status_code=401, detail="Invalid connection token") |
| 2281 | |
| 2282 | |
| 2283 | @router.get("/api/plugin/config") |
no test coverage detected