Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 327 for security (0.23 sec)

  1. tests/test_security_oauth2.py

    from dirty_equals import IsDict
    from fastapi import Depends, FastAPI, Security
    from fastapi.security import OAuth2, OAuth2PasswordRequestFormStrict
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    app = FastAPI()
    
    reusable_oauth2 = OAuth2(
        flows={
            "password": {
                "tokenUrl": "token",
                "scopes": {"read:users": "Read the users", "write:users": "Create users"},
            }
        }
    )
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 10.7K bytes
    - Viewed (0)
  2. tests/test_security_oauth2_optional.py

    from typing import Optional
    
    from dirty_equals import IsDict
    from fastapi import Depends, FastAPI, Security
    from fastapi.security import OAuth2, OAuth2PasswordRequestFormStrict
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    app = FastAPI()
    
    reusable_oauth2 = OAuth2(
        flows={
            "password": {
                "tokenUrl": "token",
                "scopes": {"read:users": "Read the users", "write:users": "Create users"},
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  3. tests/test_security_oauth2_optional_description.py

    from typing import Optional
    
    from dirty_equals import IsDict
    from fastapi import Depends, FastAPI, Security
    from fastapi.security import OAuth2, OAuth2PasswordRequestFormStrict
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    app = FastAPI()
    
    reusable_oauth2 = OAuth2(
        flows={
            "password": {
                "tokenUrl": "token",
                "scopes": {"read:users": "Read the users", "write:users": "Create users"},
    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)
  4. docs/en/docs/reference/security/index.md

    ::: fastapi.security.APIKeyCookie
    
    ::: fastapi.security.APIKeyHeader
    
    ::: fastapi.security.APIKeyQuery
    
    ## HTTP Authentication Schemes
    
    ::: fastapi.security.HTTPBasic
    
    ::: fastapi.security.HTTPBearer
    
    ::: fastapi.security.HTTPDigest
    
    ## HTTP Credentials
    
    ::: fastapi.security.HTTPAuthorizationCredentials
    
    ::: fastapi.security.HTTPBasicCredentials
    
    ## OAuth2 Authentication
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  5. docs/de/docs/reference/security/index.md

    ::: fastapi.security.APIKeyCookie
    
    ::: fastapi.security.APIKeyHeader
    
    ::: fastapi.security.APIKeyQuery
    
    ## HTTP-Authentifizierungsschemas
    
    ::: fastapi.security.HTTPBasic
    
    ::: fastapi.security.HTTPBearer
    
    ::: fastapi.security.HTTPDigest
    
    ## HTTP-Anmeldeinformationen
    
    ::: fastapi.security.HTTPAuthorizationCredentials
    
    ::: fastapi.security.HTTPBasicCredentials
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:15:05 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  6. fastapi/openapi/utils.py

            )
            security_name = security_requirement.security_scheme.scheme_name
            security_definitions[security_name] = security_definition
            operation_security.append({security_name: security_requirement.scopes})
        return security_definitions, operation_security
    
    
    def get_openapi_operation_parameters(
        *,
        all_route_params: Sequence[ModelField],
        schema_generator: GenerateJsonSchema,
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 21.8K bytes
    - Viewed (0)
  7. fastapi/dependencies/utils.py

        dependency: Callable[..., Any],
        path: str,
        name: Optional[str] = None,
        security_scopes: Optional[List[str]] = None,
    ) -> Dependant:
        security_requirement = None
        security_scopes = security_scopes or []
        if isinstance(depends, params.Security):
            dependency_scopes = depends.scopes
            security_scopes.extend(dependency_scopes)
        if isinstance(dependency, SecurityBase):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:52:56 GMT 2024
    - 29.5K bytes
    - Viewed (0)
  8. docs/de/docs/advanced/security/http-basic-auth.md

    * Erstellen Sie mit `HTTPBasic` ein „`security`-Schema“.
    * Verwenden Sie dieses `security` mit einer Abhängigkeit in Ihrer *Pfadoperation*.
    * Diese gibt ein Objekt vom Typ `HTTPBasicCredentials` zurück:
        * Es enthält den gesendeten `username` und das gesendete `password`.
    
    === "Python 3.9+"
    
        ```Python hl_lines="4  8  12"
        {!> ../../../docs_src/security/tutorial006_an_py39.py!}
        ```
    
    === "Python 3.8+"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:28:08 GMT 2024
    - 6.9K bytes
    - Viewed (0)
  9. docs_src/security/tutorial005_an_py39.py

        encoded_jwt = jwt.encode(to_encode, SECRET_KEY, algorithm=ALGORITHM)
        return encoded_jwt
    
    
    async def get_current_user(
        security_scopes: SecurityScopes, token: Annotated[str, Depends(oauth2_scheme)]
    ):
        if security_scopes.scopes:
            authenticate_value = f'Bearer scope="{security_scopes.scope_str}"'
        else:
            authenticate_value = "Bearer"
        credentials_exception = HTTPException(
    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)
  10. docs_src/security/tutorial005_py39.py

        encoded_jwt = jwt.encode(to_encode, SECRET_KEY, algorithm=ALGORITHM)
        return encoded_jwt
    
    
    async def get_current_user(
        security_scopes: SecurityScopes, token: str = Depends(oauth2_scheme)
    ):
        if security_scopes.scopes:
            authenticate_value = f'Bearer scope="{security_scopes.scope_str}"'
        else:
            authenticate_value = "Bearer"
        credentials_exception = HTTPException(
    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)
Back to top