Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 199 for scope3 (0.04 sec)

  1. 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()
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 973 bytes
    - Viewed (0)
  2. 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 | Peligro
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 10:15:01 UTC 2025
    - 14.2K bytes
    - Viewed (0)
  3. 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.
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Sep 30 11:37:11 UTC 2025
    - 20.7K bytes
    - Viewed (0)
  4. docs/pt/docs/advanced/security/oauth2-scopes.md

    /// tip | Dica
    
    A coisa importante e "mágica" aqui é que `get_current_user` terá diferentes listas de `scopes` para validar para cada *operação de rota*.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Nov 12 16:23:57 UTC 2025
    - 14.9K bytes
    - Viewed (0)
  5. 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));
        }
    
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Thu Nov 27 07:40:26 UTC 2025
    - 21.2K bytes
    - Viewed (0)
  6. 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.
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 22K bytes
    - Viewed (0)
  7. 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(
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Sep 29 02:57:38 UTC 2025
    - 5.3K bytes
    - Viewed (0)
  8. 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(
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Sep 29 02:57:38 UTC 2025
    - 5.3K bytes
    - Viewed (0)
  9. 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(
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Sep 29 02:57:38 UTC 2025
    - 5.3K bytes
    - Viewed (0)
  10. 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(
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Sep 29 02:57:38 UTC 2025
    - 5.2K bytes
    - Viewed (0)
Back to top