Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 79 for shapes (0.18 sec)

  1. docs/en/docs/tutorial/first-steps.md

    This schema definition includes your API paths, the possible parameters they take, etc.
    
    #### Data "schema"
    
    The term "schema" might also refer to the shape of some data, like a JSON content.
    
    In that case, it would mean the JSON attributes, and data types they have, etc.
    
    #### OpenAPI and JSON Schema
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 12K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/response-model.md

    * Add a **JSON Schema** for the response, in the OpenAPI *path operation*.
        * This will be used by the **automatic docs**.
        * It will also be used by automatic client code generation tools.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 17.9K bytes
    - Viewed (0)
  3. docs_src/security/tutorial005_an.py

                raise credentials_exception
            token_scopes = payload.get("scopes", [])
            token_data = TokenData(scopes=token_scopes, username=username)
        except (JWTError, ValidationError):
            raise credentials_exception
        user = get_user(fake_users_db, username=token_data.username)
        if user is None:
            raise credentials_exception
        for scope in security_scopes.scopes:
            if scope not in token_data.scopes:
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  4. fastapi/dependencies/models.py

            self.response_param_name = response_param_name
            self.background_tasks_param_name = background_tasks_param_name
            self.security_scopes = security_scopes
            self.security_scopes_param_name = security_scopes_param_name
            self.name = name
            self.call = call
            self.use_cache = use_cache
            # Store the path to be able to re-generate a dependable from it in overrides
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 2.4K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/bigger-applications.md

    Now, let's imagine your organization gave you the `app/internal/admin.py` file.
    
    It contains an `APIRouter` with some admin *path operations* that your organization shares between several projects.
    
    For this example it will be super simple. But let's say that because it is shared with other projects in the organization, we cannot modify it and add a `prefix`, `dependencies`, `tags`, etc. directly to the `APIRouter`:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  6. tests/test_security_oauth2_optional.py

    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"},
            }
        },
        auto_error=False,
    )
    
    
    class User(BaseModel):
        username: str
    
    
    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)
  7. docs/en/docs/tutorial/security/oauth2-jwt.md

    <img src="/img/tutorial/security/image10.png">
    
    !!! note
        Notice the header `Authorization`, with a value that starts with `Bearer `.
    
    ## Advanced usage with `scopes`
    
    OAuth2 has the notion of "scopes".
    
    You can use them to add a specific set of permissions to a JWT token.
    
    Then you can give this token to a user directly or a third party, to interact with your API with a set of restrictions.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 13K bytes
    - Viewed (0)
  8. docs/en/docs/how-to/conditional-openapi.md

    * Never store plaintext passwords, only password hashes.
    * Implement and use well-known cryptographic tools, like Passlib and JWT tokens, etc.
    * Add more granular permission controls with OAuth2 scopes where needed.
    * ...etc.
    
    Nevertheless, you might have a very specific use case where you really need to disable the API docs for some environment (e.g. for production) or depending on configurations from environment variables.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Aug 19 19:54:04 GMT 2023
    - 2.3K bytes
    - Viewed (0)
  9. docs/zh/docs/tutorial/security/simple-oauth2.md

        但由于这种用例很常见,FastAPI 为了简便,就直接提供了对它的支持。
    
    ### 使用表单数据
    
    !!! tip "提示"
    
        `OAuth2PasswordRequestForm` 类依赖项的实例没有以空格分隔的长字符串属性 `scope`,但它支持 `scopes` 属性,由已发送的 scope 字符串列表组成。
    
        本例没有使用 `scopes`,但开发者也可以根据需要使用该属性。
    
    现在,即可使用表单字段 `username`,从(伪)数据库中获取用户数据。
    
    如果不存在指定用户,则返回错误消息,提示**用户名或密码错误**。
    
    本例使用 `HTTPException` 异常显示此错误:
    
    ```Python hl_lines="3  77-79"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.8K bytes
    - Viewed (0)
  10. docs/em/docs/tutorial/security/simple-oauth2.md

        ✋️ ⚫️ ⚠ ⚙️ 💼, ⚫️ 🚚 **FastAPI** 🔗, ⚒ ⚫️ ⏩.
    
    ### ⚙️ 📨 💽
    
    !!! tip
        👐 🔗 🎓 `OAuth2PasswordRequestForm` 🏆 🚫 ✔️ 🔢 `scope` ⏮️ 📏 🎻 👽 🚀, ↩️, ⚫️ 🔜 ✔️ `scopes` 🔢 ⏮️ ☑ 📇 🎻 🔠 ↔ 📨.
    
        👥 🚫 ⚙️ `scopes` 👉 🖼, ✋️ 🛠️ 📤 🚥 👆 💪 ⚫️.
    
    🔜, 🤚 👩‍💻 📊 ⚪️➡️ (❌) 💽, ⚙️ `username` ⚪️➡️ 📨 🏑.
    
    🚥 📤 🙅‍♂ ✅ 👩‍💻, 👥 📨 ❌ 💬 "❌ 🆔 ⚖️ 🔐".
    
    ❌, 👥 ⚙️ ⚠ `HTTPException`:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.9K bytes
    - Viewed (0)
Back to top