- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 116 for scope3 (0.09 seconds)
-
tests/test_security_scopes_dont_propagate.py
from fastapi.testclient import TestClient async def security1(scopes: SecurityScopes): return scopes.scopes async def security2(scopes: SecurityScopes): return scopes.scopes async def dep3( dep1: Annotated[list[str], Security(security1, scopes=["scope1"])], dep2: Annotated[list[str], Security(security2, scopes=["scope2"])], ): return {"dep1": dep1, "dep2": dep2} app = FastAPI()
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 973 bytes - Click Count (0) -
docs/es/docs/advanced/security/oauth2-scopes.md
## Token JWT con scopes { #jwt-token-with-scopes } Ahora, modifica la *path operation* del token para devolver los scopes solicitados. Todavía estamos usando el mismo `OAuth2PasswordRequestForm`. Incluye una propiedad `scopes` con una `list` de `str`, con cada scope que recibió en el request. Y devolvemos los scopes como parte del token JWT. /// danger | PeligroCreated: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 10:15:01 GMT 2025 - 14.2K bytes - Click Count (0) -
impl/maven-core/src/main/java/org/apache/maven/internal/transformation/impl/DefaultConsumerPomBuilder.java
if (scopeId == null || scopeId.isEmpty()) { scope = DependencyScope.COMPILE; } else { scope = DependencyScope.forId(scopeId); } return scope == null || !scope.isTransitive(); } private Dependency merge(Dependency dep1, Dependency dep2) { throw new IllegalArgumentException("Duplicate dependency: " + getDependencyKey(dep1)); }
Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Thu Nov 27 07:40:26 GMT 2025 - 21.2K bytes - Click Count (0) -
fastapi/security/oauth2.py
data = {} data["scopes"] = [] for scope in form_data.scopes: data["scopes"].append(scope) if form_data.client_id: data["client_id"] = form_data.client_id if form_data.client_secret: data["client_secret"] = form_data.client_secret return data ``` Note that for OAuth2 the scope `items:read` is a single scope in an opaque string.Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 22K bytes - Click Count (0) -
tests/test_dependency_yield_scope.py
return StreamingResponse(iter_data()) app.include_router( prefix="/router-scope-function", router=router, dependencies=[Depends(raise_after_yield, scope="function")], ) app.include_router( prefix="/router-scope-request", router=router, dependencies=[Depends(raise_after_yield, scope="request")], ) client = TestClient(app) def test_function_scope() -> None:Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 6.7K bytes - Click Count (0) -
tests/test_dependency_yield_scope_websockets.py
def test_broken_scope() -> None: with pytest.raises( FastAPIError, match='The dependency "get_named_func_session" has a scope of "request", it cannot depend on dependencies with scope "function"', ): @app.websocket("/broken-scope") async def get_broken( websocket: WebSocket, sessions: BrokenSessionsDep ) -> Any: # pragma: no cover pass
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 6K bytes - Click Count (0) -
fastapi/dependencies/models.py
path: Optional[str] = None scope: Union[Literal["function", "request"], None] = None @cached_property def oauth_scopes(self) -> list[str]: scopes = self.parent_oauth_scopes.copy() if self.parent_oauth_scopes else [] # This doesn't use a set to preserve order, just in case for scope in self.own_oauth_scopes or []: if scope not in scopes: scopes.append(scope)
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 7.1K bytes - Click Count (0) -
docs/es/docs/tutorial/security/simple-oauth2.md
### `scope` { #scope } La especificación también indica que el cliente puede enviar otro campo del formulario llamado "`scope`". El nombre del campo del formulario es `scope` (en singular), pero en realidad es un string largo con "scopes" separados por espacios. Cada "scope" es simplemente un string (sin espacios).Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Dec 16 16:33:45 GMT 2025 - 10.3K bytes - Click Count (0) -
tests/test_security_oauth2.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 9K bytes - Click Count (0) -
tests/test_security_oauth2_optional_description.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 9.1K bytes - Click Count (0)