Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 38 for scope (0.12 sec)

  1. 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.
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 21.1K bytes
    - Viewed (1)
  2. tests/test_tutorial/test_security/test_tutorial005_an.py

        fake_users_db,
        get_password_hash,
        verify_password,
    )
    
    client = TestClient(app)
    
    
    def get_access_token(username="johndoe", password="secret", scope=None):
        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
    - 15.4K bytes
    - Viewed (0)
  3. docs/em/docs/advanced/security/oauth2-scopes.md

                        * ๐Ÿ”— โš™๏ธ `oauth2_scheme`.
                        *  `security_scopes` ๐Ÿ”ข ๐Ÿ†Ž `SecurityScopes`:
                            * ๐Ÿ‘‰ `security_scopes` ๐Ÿ”ข โœ”๏ธ ๐Ÿ  `scopes` โฎ๏ธ `list` โš— ๐ŸŒ ๐Ÿ‘ซ โ†” ๐Ÿ“ฃ ๐Ÿ”›,:
                                * `security_scopes.scopes` ๐Ÿ”œ ๐Ÿ”Œ `["me", "items"]` *โžก ๐Ÿ› ๏ธ* `read_own_items`.
                                * `security_scopes.scopes` ๐Ÿ”œ ๐Ÿ”Œ `["me"]` *โžก ๐Ÿ› ๏ธ* `read_users_me`, โ†ฉ๏ธ โšซ๏ธ ๐Ÿ“ฃ ๐Ÿ”— `get_current_active_user`.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 21:21:35 GMT 2024
    - 11.1K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_security/test_tutorial005_py39.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)
  5. docs/de/docs/advanced/security/oauth2-scopes.md

                        * Selbst keine erforderlichen Scopes.
                        * Eine Abhรคngigkeit, die `oauth2_scheme` verwendet.
                        * Einen `security_scopes`-Parameter vom Typ `SecurityScopes`:
                            * Dieser `security_scopes`-Parameter hat ein Attribut `scopes` mit einer `list`e, die alle oben deklarierten Scopes enthรคlt, sprich:
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:26:08 GMT 2024
    - 22.8K bytes
    - Viewed (0)
  6. docs/en/docs/advanced/security/oauth2-scopes.md

                        * No scopes required by itself.
                        * A dependency using `oauth2_scheme`.
                        * A `security_scopes` parameter of type `SecurityScopes`:
                            * This `security_scopes` parameter has a property `scopes` with a `list` containing all these scopes declared above, so:
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 21:21:35 GMT 2024
    - 20.5K bytes
    - Viewed (0)
  7. tests/test_security_oauth2_optional.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.8K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_security/test_tutorial005.py

        fake_users_db,
        get_password_hash,
        verify_password,
    )
    
    client = TestClient(app)
    
    
    def get_access_token(username="johndoe", password="secret", scope=None):
        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
    - 15.4K bytes
    - Viewed (0)
  9. docs/en/docs/advanced/behind-a-proxy.md

        And the `--root-path` command line option provides that `root_path`.
    
    ### Checking the current `root_path`
    
    You can get the current `root_path` used by your application for each request, it is part of the `scope` dictionary (that's part of the ASGI spec).
    
    Here we are including it in the message just for demonstration purposes.
    
    ```Python hl_lines="8"
    {!../../../docs_src/behind_a_proxy/tutorial001.py!}
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 11.6K bytes
    - Viewed (2)
  10. tests/test_tutorial/test_security/test_tutorial005_an_py39.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)
Back to top