Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 92 for scope (0.13 sec)

  1. tests/test_tutorial/test_security/test_tutorial005_an_py310.py

        client = TestClient(app)
        return client
    
    
    def get_access_token(
        *, username="johndoe", password="secret", scope=None, client: TestClient
    ):
        data = {"username": username, "password": password}
        if scope:
            data["scope"] = scope
        response = client.post("/token", data=data)
        content = response.json()
        access_token = content.get("access_token")
        return access_token
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.3K bytes
    - Viewed (0)
  2. docs/ko/docs/tutorial/security/simple-oauth2.md

    그러나 로그인 *경로 작동*의 경우 사양과 호환되도록 이러한 이름을 사용해야 합니다(예를 들어 통합 API 문서 시스템을 사용할 수 있어야 합니다).
    
    사양에는 또한 `username`과 `password`가 폼 데이터로 전송되어야 한다고 명시되어 있습니다(따라서 여기에는 JSON이 없습니다).
    
    ### `scope`
    
    사양에는 클라이언트가 다른 폼 필드 "`scope`"를 보낼 수 있다고 나와 있습니다.
    
    폼 필드 이름은 `scope`(단수형)이지만 실제로는 공백으로 구분된 "범위"가 있는 긴 문자열입니다.
    
    각 "범위"는 공백이 없는 문자열입니다.
    
    일반적으로 특정 보안 권한을 선언하는 데 사용됩니다. 다음을 봅시다:
    
    * `users:read` 또는 `users:write`는 일반적인 예시입니다.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 22:37:23 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  3. fastapi/param_functions.py

                directly.
                """
            ),
        ] = None,
        *,
        scopes: Annotated[
            Optional[Sequence[str]],
            Doc(
                """
                OAuth2 scopes required for the *path operation* that uses this Security
                dependency.
    
                The term "scope" comes from the OAuth2 specification, it seems to be
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 62.5K bytes
    - Viewed (0)
  4. tests/test_custom_middleware_exception.py

                    )
                return message
    
            return inner
    
        async def __call__(self, scope, receive, send):
            if scope["type"] != "http" or self.max_content_size is None:
                await self.app(scope, receive, send)
                return
    
            wrapper = self.receive_wrapper(receive)
            await self.app(scope, wrapper, send)
    
    
    @router.post("/middleware")
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Aug 25 21:44:40 GMT 2022
    - 2.8K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_sql_databases/test_sql_databases.py

    import importlib
    import os
    from pathlib import Path
    
    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from ...utils import needs_pydanticv1
    
    
    @pytest.fixture(scope="module")
    def client(tmp_path_factory: pytest.TempPathFactory):
        tmp_path = tmp_path_factory.mktemp("data")
        cwd = os.getcwd()
        os.chdir(tmp_path)
        test_db = Path("./sql_app.db")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.1K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py310.py

    import importlib
    import os
    from pathlib import Path
    
    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310, needs_pydanticv1
    
    
    @pytest.fixture(scope="module")
    def client(tmp_path_factory: pytest.TempPathFactory):
        tmp_path = tmp_path_factory.mktemp("data")
        cwd = os.getcwd()
        os.chdir(tmp_path)
        test_db = Path("./sql_app.db")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.5K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_security/test_tutorial003_an_py310.py

                            ),
                            "username": {"title": "Username", "type": "string"},
                            "password": {"title": "Password", "type": "string"},
                            "scope": {"title": "Scope", "type": "string", "default": ""},
                            "client_id": IsDict(
                                {
                                    "title": "Client Id",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 8.4K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_security/test_tutorial003_py310.py

                            ),
                            "username": {"title": "Username", "type": "string"},
                            "password": {"title": "Password", "type": "string"},
                            "scope": {"title": "Scope", "type": "string", "default": ""},
                            "client_id": IsDict(
                                {
                                    "title": "Client Id",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 8.4K bytes
    - Viewed (0)
  9. tests/test_security_oauth2.py

                            },
                            "username": {"title": "Username", "type": "string"},
                            "password": {"title": "Password", "type": "string"},
                            "scope": {"title": "Scope", "type": "string", "default": ""},
                            "client_id": IsDict(
                                {
                                    "title": "Client Id",
    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)
  10. tests/test_tutorial/test_custom_docs_ui/test_tutorial002.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.tutorial002 import app
    
        with TestClient(app) as client:
            yield client
        static_dir.rmdir()
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Aug 19 19:54:04 GMT 2023
    - 1.2K bytes
    - Viewed (0)
Back to top