- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 20 for HTTPBasic (0.14 sec)
-
docs_src/security/tutorial006_an.py
from fastapi import Depends, FastAPI from fastapi.security import HTTPBasic, HTTPBasicCredentials from typing_extensions import Annotated app = FastAPI() security = HTTPBasic() @app.get("/users/me") def read_current_user(credentials: Annotated[HTTPBasicCredentials, Depends(security)]):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 371 bytes - Viewed (0) -
docs_src/security/tutorial006_an_py39.py
from typing import Annotated from fastapi import Depends, FastAPI from fastapi.security import HTTPBasic, HTTPBasicCredentials app = FastAPI() security = HTTPBasic() @app.get("/users/me") def read_current_user(credentials: Annotated[HTTPBasicCredentials, Depends(security)]):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 361 bytes - Viewed (0) -
docs/zh/docs/advanced/security/http-basic-auth.md
如果没有接收到 HTTP 基础授权,就返回 HTTP 401 `"Unauthorized"` 错误。 并返回含 `Basic` 值的请求头 `WWW-Authenticate`以及可选的 `realm` 参数。 HTTP 基础授权让浏览器显示内置的用户名与密码提示。 输入用户名与密码后,浏览器会把它们自动发送至请求头。 ## 简单的 HTTP 基础授权 * 导入 `HTTPBasic` 与 `HTTPBasicCredentials` * 使用 `HTTPBasic` 创建**安全概图** * 在*路径操作*的依赖项中使用 `security` * 返回类型为 `HTTPBasicCredentials` 的对象: * 包含发送的 `username` 与 `password` //// tab | Python 3.9+ ```Python hl_lines="4 8 12"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.2K bytes - Viewed (0) -
fastapi/security/__init__.py
from .api_key import APIKeyHeader as APIKeyHeader from .api_key import APIKeyQuery as APIKeyQuery from .http import HTTPAuthorizationCredentials as HTTPAuthorizationCredentials from .http import HTTPBasic as HTTPBasic from .http import HTTPBasicCredentials as HTTPBasicCredentials from .http import HTTPBearer as HTTPBearer from .http import HTTPDigest as HTTPDigest from .oauth2 import OAuth2 as OAuth2
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Dec 20 18:50:00 UTC 2020 - 881 bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial006.py
"summary": "Read Current User", "operationId": "read_current_user_users_me_get", "security": [{"HTTPBasic": []}], } } }, "components": { "securitySchemes": {"HTTPBasic": {"type": "http", "scheme": "basic"}} },
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.3K bytes - Viewed (0) -
fastapi/security/http.py
## Example ```python from typing import Annotated from fastapi import Depends, FastAPI from fastapi.security import HTTPBasic, HTTPBasicCredentials app = FastAPI() security = HTTPBasic() @app.get("/users/me") def read_current_user(credentials: Annotated[HTTPBasicCredentials, Depends(security)]):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Sep 19 09:47:28 UTC 2024 - 13.2K bytes - Viewed (0) -
docs/pt/docs/advanced/security/http-basic-auth.md
Então, quando você digitar o usuário e senha, o navegador os envia automaticamente no cabeçalho. ## HTTP Basic Auth Simples * Importe `HTTPBasic` e `HTTPBasicCredentials`. * Crie um "esquema `security`" utilizando `HTTPBasic`. * Utilize o `security` com uma dependência em sua *operação de rota*. * Isso retorna um objeto do tipo `HTTPBasicCredentials`: * Isto contém o `username` e o `password` enviado.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 6.2K bytes - Viewed (0) -
docs/en/docs/advanced/security/http-basic-auth.md
Then, when you type that username and password, the browser sends them in the header automatically. ## Simple HTTP Basic Auth * Import `HTTPBasic` and `HTTPBasicCredentials`. * Create a "`security` scheme" using `HTTPBasic`. * Use that `security` with a dependency in your *path operation*. * It returns an object of type `HTTPBasicCredentials`: * It contains the `username` and `password` sent.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Oct 26 16:01:27 UTC 2024 - 4.8K bytes - Viewed (0) -
docs/em/docs/advanced/security/http-basic-auth.md
& 📨 🎚 `WWW-Authenticate` ⏮️ 💲 `Basic`, & 📦 `realm` 🔢. 👈 💬 🖥 🎦 🛠️ 📋 🆔 & 🔐. ⤴️, 🕐❔ 👆 🆎 👈 🆔 & 🔐, 🖥 📨 👫 🎚 🔁. ## 🙅 🇺🇸🔍 🔰 🔐 * 🗄 `HTTPBasic` & `HTTPBasicCredentials`. * ✍ "`security` ⚖" ⚙️ `HTTPBasic`. * ⚙️ 👈 `security` ⏮️ 🔗 👆 *➡ 🛠️*. * ⚫️ 📨 🎚 🆎 `HTTPBasicCredentials`: * ⚫️ 🔌 `username` & `password` 📨. ```Python hl_lines="2 6 10"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 4.1K bytes - Viewed (0) -
docs/de/docs/advanced/security/http-basic-auth.md
Wenn Sie dann den Benutzernamen und das Passwort eingeben, sendet der Browser diese automatisch im Header. ## Einfaches HTTP Basic Auth * Importieren Sie `HTTPBasic` und `HTTPBasicCredentials`. * Erstellen Sie mit `HTTPBasic` ein „`security`-Schema“. * Verwenden Sie dieses `security` mit einer Abhängigkeit in Ihrer *Pfadoperation*. * Diese gibt ein Objekt vom Typ `HTTPBasicCredentials` zurück:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 15:25:54 UTC 2024 - 5.8K bytes - Viewed (0)