Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 135 for Scheme (0.19 sec)

  1. fastapi/security/http.py

        ):
            self.model = HTTPBaseModel(scheme=scheme, description=description)
            self.scheme_name = scheme_name or self.__class__.__name__
            self.auto_error = auto_error
    
        async def __call__(
            self, request: Request
        ) -> Optional[HTTPAuthorizationCredentials]:
            authorization = request.headers.get("Authorization")
            scheme, credentials = get_authorization_scheme_param(authorization)
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Apr 19 15:29:38 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  2. fastapi/security/oauth2.py

                flows=flows,
                scheme_name=scheme_name,
                description=description,
                auto_error=auto_error,
            )
    
        async def __call__(self, request: Request) -> Optional[str]:
            authorization = request.headers.get("Authorization")
            scheme, param = get_authorization_scheme_param(authorization)
            if not authorization or scheme.lower() != "bearer":
                if self.auto_error:
    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)
  3. docs/em/docs/advanced/security/oauth2-scopes.md

    ## ⚙️ `SecurityScopes`
    
    🔜 ℹ 🔗 `get_current_user`.
    
    👉 1️⃣ ⚙️ 🔗 🔛.
    
    📥 👥 ⚙️ 🎏 Oauth2️⃣ ⚖ 👥 ✍ ⏭, 📣 ⚫️ 🔗: `oauth2_scheme`.
    
    ↩️ 👉 🔗 🔢 🚫 ✔️ 🙆 ↔ 📄 ⚫️, 👥 💪 ⚙️ `Depends` ⏮️ `oauth2_scheme`, 👥 🚫 ✔️ ⚙️ `Security` 🕐❔ 👥 🚫 💪 ✔ 💂‍♂ ↔.
    
    👥 📣 🎁 🔢 🆎 `SecurityScopes`, 🗄 ⚪️➡️ `fastapi.security`.
    
    👉 `SecurityScopes` 🎓 🎏 `Request` (`Request` ⚙️ 🤚 📨 🎚 🔗).
    
    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. docs/ja/docs/tutorial/security/first-steps.md

    変数`oauth2_scheme`は`OAuth2PasswordBearer`のインスタンスですが、「呼び出し可能」です。
    
    次のように、呼ぶことができます:
    
    ```Python
    oauth2_scheme(some, parameters)
    ```
    
    そのため、`Depends`と一緒に使うことができます。
    
    ### 使い方
    
    これで`oauth2_scheme`を`Depends`で依存関係に渡すことができます。
    
    ```Python hl_lines="10"
    {!../../../docs_src/security/tutorial001.py!}
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  5. docs/en/docs/advanced/security/oauth2-scopes.md

    This is the one used by the dependencies above.
    
    Here's were we are using the same OAuth2 scheme we created before, declaring it as a dependency: `oauth2_scheme`.
    
    Because this dependency function doesn't have any scope requirements itself, we can use `Depends` with `oauth2_scheme`, we don't have to use `Security` when we don't need to specify security scopes.
    
    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)
  6. docs/ru/docs/tutorial/security/first-steps.md

    Переменная `oauth2_scheme` является экземпляром `OAuth2PasswordBearer`, но она также является "вызываемой".
    
    Ее можно вызвать следующим образом:
    
    ```Python
    oauth2_scheme(some, parameters)
    ```
    
    Поэтому ее можно использовать вместе с `Depends`.
    
    ### Использование
    
    Теперь вы можете передать ваш `oauth2_scheme` в зависимость с помощью `Depends`.
    
    === "Python 3.9+"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  7. docs/de/docs/tutorial/security/first-steps.md

    Die Variable `oauth2_scheme` ist eine Instanz von `OAuth2PasswordBearer`, aber auch ein „Callable“.
    
    Es könnte wie folgt aufgerufen werden:
    
    ```Python
    oauth2_scheme(some, parameters)
    ```
    
    Es kann also mit `Depends` verwendet werden.
    
    ### Verwendung
    
    Jetzt können Sie dieses `oauth2_scheme` als Abhängigkeit `Depends` übergeben.
    
    === "Python 3.9+"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:07:08 GMT 2024
    - 10.3K bytes
    - Viewed (0)
  8. tests/test_security_oauth2_optional_description.py

                                "content": {"application/json": {"schema": {}}},
                            },
                            "422": {
                                "description": "Validation Error",
                                "content": {
                                    "application/json": {
                                        "schema": {
    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)
  9. docs/zh/docs/advanced/security/oauth2-scopes.md

    ## 使用 `SecurityScopes`
    
    修改依赖项 `get_current_user`。
    
    这是上面的依赖项使用的依赖项。
    
    这里使用的也是之前创建的 OAuth2 方案,并把它声明为依赖项:`oauth2_scheme`。
    
    该依赖项函数本身不需要作用域,因此,可以使用 `Depends` 和 `oauth2_scheme`。不需要指定安全作用域时,不必使用 `Security`。
    
    此处还声明了从 `fastapin.security` 导入的 `SecurityScopes` 类型的特殊参数。
    
    `SecuriScopes` 类与 `Request` 类似(`Request` 用于直接提取请求对象)。
    
    ```Python hl_lines="8  105"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 22:43:35 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  10. fastapi/openapi/utils.py

            field_info = param.field_info
            field_info = cast(Param, field_info)
            if not field_info.include_in_schema:
                continue
            param_schema = get_schema_from_model_field(
                field=param,
                schema_generator=schema_generator,
                model_name_map=model_name_map,
                field_mapping=field_mapping,
                separate_input_output_schemas=separate_input_output_schemas,
    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)
Back to top