Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 56 for OAuth2PasswordBearer (0.17 sec)

  1. docs_src/security/tutorial001.py

    from fastapi import Depends, FastAPI
    from fastapi.security import OAuth2PasswordBearer
    
    app = FastAPI()
    
    oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
    
    
    @app.get("/items/")
    async def read_items(token: str = Depends(oauth2_scheme)):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 10 17:28:18 UTC 2020
    - 269 bytes
    - Viewed (0)
  2. docs/em/docs/tutorial/security/first-steps.md

        * 🚥 🤝 🔌 `foobar`, 🎚 `Authorization` 🎚 🔜: `Bearer foobar`.
    
    ## **FastAPI**'Ⓜ `OAuth2PasswordBearer`
    
    **FastAPI** 🚚 📚 🧰, 🎏 🎚 ⚛, 🛠️ 👫 💂‍♂ ⚒.
    
    👉 🖼 👥 🔜 ⚙️ **Oauth2️⃣**, ⏮️ **🔐** 💧, ⚙️ **📨** 🤝. 👥 👈 ⚙️ `OAuth2PasswordBearer` 🎓.
    
    /// info
    
    "📨" 🤝 🚫 🕴 🎛.
    
    ✋️ ⚫️ 🏆 1️⃣ 👆 ⚙️ 💼.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  3. docs/ru/docs/tutorial/security/first-steps.md

    ## Класс `OAuth2PasswordBearer` в **FastAPI**
    
    **FastAPI** предоставляет несколько средств на разных уровнях абстракции для реализации этих функций безопасности.
    
    В данном примере мы будем использовать **OAuth2**, с аутентификацией по паролю, используя токен **Bearer**. Для этого мы используем класс `OAuth2PasswordBearer`.
    
    /// info | "Дополнительная информация"
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_security/test_tutorial001_an.py

                        "summary": "Read Items",
                        "operationId": "read_items_items__get",
                        "security": [{"OAuth2PasswordBearer": []}],
                    }
                }
            },
            "components": {
                "securitySchemes": {
                    "OAuth2PasswordBearer": {
                        "type": "oauth2",
                        "flows": {"password": {"scopes": {}, "tokenUrl": "token"}},
                    }
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  5. docs_src/security/tutorial002_an_py39.py

    from typing import Annotated, Union
    
    from fastapi import Depends, FastAPI
    from fastapi.security import OAuth2PasswordBearer
    from pydantic import BaseModel
    
    app = FastAPI()
    
    oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
    
    
    class User(BaseModel):
        username: str
        email: Union[str, None] = None
        full_name: Union[str, None] = None
        disabled: Union[bool, None] = None
    
    
    def fake_decode_token(token):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 786 bytes
    - Viewed (0)
  6. tests/test_tutorial/test_security/test_tutorial005_an.py

                            }
                        },
                        "summary": "Read Users Me",
                        "operationId": "read_users_me_users_me__get",
                        "security": [{"OAuth2PasswordBearer": ["me"]}],
                    }
                },
                "/users/me/items/": {
                    "get": {
                        "responses": {
                            "200": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Mar 13 19:07:10 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  7. docs/de/docs/tutorial/security/first-steps.md

    ## **FastAPI**s `OAuth2PasswordBearer`
    
    **FastAPI** bietet mehrere Tools auf unterschiedlichen Abstraktionsebenen zur Implementierung dieser Sicherheitsfunktionen.
    
    In diesem Beispiel verwenden wir **OAuth2** mit dem **Password**-Flow und einem **Bearer**-Token. Wir machen das mit der Klasse `OAuth2PasswordBearer`.
    
    /// info
    
    Ein „Bearer“-Token ist nicht die einzige Option.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  8. docs/zh/docs/tutorial/security/first-steps.md

    ## **FastAPI** 的 `OAuth2PasswordBearer`
    
    **FastAPI** 提供了不同抽象级别的安全工具。
    
    本例使用 **OAuth2** 的 **Password** 流以及 **Bearer** 令牌(`Token`)。为此要使用 `OAuth2PasswordBearer` 类。
    
    /// info | "说明"
    
    `Bearer` 令牌不是唯一的选择。
    
    但它是最适合这个用例的方案。
    
    甚至可以说,它是适用于绝大多数用例的最佳方案,除非您是 OAuth2 的专家,知道为什么其它方案更合适。
    
    本例中,**FastAPI** 还提供了构建工具。
    
    ///
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_security/test_tutorial005_py310.py

                            }
                        },
                        "summary": "Read Users Me",
                        "operationId": "read_users_me_users_me__get",
                        "security": [{"OAuth2PasswordBearer": ["me"]}],
                    }
                },
                "/users/me/items/": {
                    "get": {
                        "responses": {
                            "200": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Mar 13 19:07:10 UTC 2024
    - 16.3K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_security/test_tutorial005_py39.py

                            }
                        },
                        "summary": "Read Users Me",
                        "operationId": "read_users_me_users_me__get",
                        "security": [{"OAuth2PasswordBearer": ["me"]}],
                    }
                },
                "/users/me/items/": {
                    "get": {
                        "responses": {
                            "200": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Mar 13 19:07:10 UTC 2024
    - 16.3K bytes
    - Viewed (0)
Back to top