- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 178 for cscopes (0.04 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
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/pt/docs/advanced/security/oauth2-scopes.md
## Verifique os `scopes` { #verify-the-scopes } Nós verificamos agora que todos os escopos necessários, por essa dependência e todos os dependentes (incluindo as *operações de rota*) estão incluídas nos escopos fornecidos pelo token recebido, caso contrário, levantamos uma `HTTPException`. Para isso, nós utilizamos `security_scopes.scopes`, que contém uma `list` com todos esses escopos como uma `str`.Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Nov 12 16:23:57 GMT 2025 - 14.9K bytes - Click Count (0) -
docs/de/docs/advanced/security/oauth2-scopes.md
## Abhängigkeitsbaum und Scopes { #dependency-tree-and-scopes } Sehen wir uns diesen Abhängigkeitsbaum und die Scopes noch einmal an. Da die Abhängigkeit `get_current_active_user` von `get_current_user` abhängt, wird der bei `get_current_active_user` deklarierte Scope `"me"` in die Liste der erforderlichen Scopes in `security_scopes.scopes` aufgenommen, das an `get_current_user` übergeben wird.Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Sep 20 15:10:09 GMT 2025 - 15.7K bytes - Click Count (0) -
docs/ru/docs/advanced/security/oauth2-scopes.md
Для этого используем `security_scopes.scopes`, содержащий `list` со всеми этими scopes как `str`. {* ../../docs_src/security/tutorial005_an_py310.py hl[130:136] *} ## Дерево зависимостей и scopes { #dependency-tree-and-scopes } Ещё раз рассмотрим дерево зависимостей и scopes.Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Sep 30 11:37:11 GMT 2025 - 20.7K bytes - Click Count (0) -
docs/en/docs/advanced/security/oauth2-scopes.md
Nevertheless, you still enforce those scopes, or any other security/authorization requirement, however you need, in your code. In many cases, OAuth2 with scopes can be an overkill. But if you know you need it, or you are curious, keep reading. /// ## OAuth2 scopes and OpenAPI { #oauth2-scopes-and-openapi }Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sun Aug 31 10:49:48 GMT 2025 - 13.5K 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) -
docs_src/security/tutorial005_an_py310.py
if user is None: raise credentials_exception for scope in security_scopes.scopes: if scope not in token_data.scopes: raise HTTPException( status_code=status.HTTP_401_UNAUTHORIZED, detail="Not enough permissions", headers={"WWW-Authenticate": authenticate_value}, ) return user async def get_current_active_user(Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Sep 29 02:57:38 GMT 2025 - 5.3K bytes - Click Count (0) -
docs_src/security/tutorial005_an_py39.py
if user is None: raise credentials_exception for scope in security_scopes.scopes: if scope not in token_data.scopes: raise HTTPException( status_code=status.HTTP_401_UNAUTHORIZED, detail="Not enough permissions", headers={"WWW-Authenticate": authenticate_value}, ) return user async def get_current_active_user(Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Sep 29 02:57:38 GMT 2025 - 5.3K bytes - Click Count (0) -
docs_src/security/tutorial005_py39.py
if user is None: raise credentials_exception for scope in security_scopes.scopes: if scope not in token_data.scopes: raise HTTPException( status_code=status.HTTP_401_UNAUTHORIZED, detail="Not enough permissions", headers={"WWW-Authenticate": authenticate_value}, ) return user async def get_current_active_user(Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Sep 29 02:57:38 GMT 2025 - 5.3K bytes - Click Count (0) -
docs_src/security/tutorial005_py310.py
if user is None: raise credentials_exception for scope in security_scopes.scopes: if scope not in token_data.scopes: raise HTTPException( status_code=status.HTTP_401_UNAUTHORIZED, detail="Not enough permissions", headers={"WWW-Authenticate": authenticate_value}, ) return user async def get_current_active_user(Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Sep 29 02:57:38 GMT 2025 - 5.2K bytes - Click Count (0)