- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 92 for scope (0.18 sec)
-
docs_src/security/tutorial005_an_py39.py
raise credentials_exception token_scopes = payload.get("scopes", []) token_data = TokenData(scopes=token_scopes, username=username) except (JWTError, ValidationError): raise credentials_exception user = get_user(fake_users_db, username=token_data.username) if user is None: raise credentials_exception for scope in security_scopes.scopes: if scope not in token_data.scopes:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 5.2K bytes - Viewed (0) -
docs_src/security/tutorial005_py39.py
raise credentials_exception token_scopes = payload.get("scopes", []) token_data = TokenData(scopes=token_scopes, username=username) except (JWTError, ValidationError): raise credentials_exception user = get_user(fake_users_db, username=token_data.username) if user is None: raise credentials_exception for scope in security_scopes.scopes: if scope not in token_data.scopes:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 5.1K bytes - Viewed (0) -
docs_src/security/tutorial005.py
raise credentials_exception token_scopes = payload.get("scopes", []) token_data = TokenData(scopes=token_scopes, username=username) except (JWTError, ValidationError): raise credentials_exception user = get_user(fake_users_db, username=token_data.username) if user is None: raise credentials_exception for scope in security_scopes.scopes: if scope not in token_data.scopes:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 5.1K bytes - Viewed (0) -
tests/test_tutorial/test_custom_docs_ui/test_tutorial001.py
import os from pathlib import Path import pytest from fastapi.testclient import TestClient @pytest.fixture(scope="module") def client(): static_dir: Path = Path(os.getcwd()) / "static" print(static_dir) static_dir.mkdir(exist_ok=True) from docs_src.custom_docs_ui.tutorial001 import app with TestClient(app) as client: yield client static_dir.rmdir()
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Mon Oct 30 09:58:58 GMT 2023 - 1.3K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial003_an.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 8K bytes - Viewed (0) -
docs/de/docs/advanced/behind-a-proxy.md
### Überprüfen des aktuellen `root_path` Sie können den aktuellen `root_path` abrufen, der von Ihrer Anwendung für jede Anfrage verwendet wird. Er ist Teil des `scope`-Dictionarys (das ist Teil der ASGI-Spezifikation). Hier fügen wir ihn, nur zu Demonstrationszwecken, in die Nachricht ein. ```Python hl_lines="8" {!../../../docs_src/behind_a_proxy/tutorial001.py!} ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 20:30:07 GMT 2024 - 13.1K bytes - Viewed (0) -
docs_src/behind_a_proxy/tutorial003.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jul 10 17:28:18 GMT 2020 - 405 bytes - Viewed (0) -
docs_src/behind_a_proxy/tutorial004.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jul 10 17:28:18 GMT 2020 - 437 bytes - Viewed (0) -
tests/test_deprecated_openapi_prefix.py
from fastapi.testclient import TestClient app = FastAPI(openapi_prefix="/api/v1") @app.get("/app") def read_main(request: Request): return {"message": "Hello World", "root_path": request.scope.get("root_path")} client = TestClient(app) def test_main(): response = client.get("/app") assert response.status_code == 200
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 1.2K bytes - Viewed (0) -
tests/test_security_oauth2_optional_description.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 10.9K bytes - Viewed (0)