- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 64 for pwdlib (0.05 seconds)
-
docs/en/docs/tutorial/security/oauth2-jwt.md
## Install `pwdlib` { #install-pwdlib } pwdlib is a great Python package to handle password hashes. It supports many secure hashing algorithms and utilities to work with them. The recommended algorithm is "Argon2". Make sure you create a [virtual environment](../../virtual-environments.md), activate it, and then install pwdlib with Argon2: <div class="termy"> ```consoleCreated: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 10.7K bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/security/oauth2-jwt.md
因此,竊賊無法直接拿該密碼去嘗試登入其他系統(由於許多使用者在各處都用同一組密碼,這會很危險)。 ## 安裝 `pwdlib` { #install-pwdlib } pwdlib 是一個很棒的 Python 套件,用來處理密碼雜湊。 它支援多種安全的雜湊演算法與相關工具。 建議使用的演算法是「Argon2」。 請先建立並啟用一個[虛擬環境](../../virtual-environments.md),然後以 Argon2 支援安裝 pwdlib: <div class="termy"> ```console $ pip install "pwdlib[argon2]" ---> 100% ``` </div> /// tip | 提示 使用 `pwdlib`,你甚至可以把它設定為能讀取由 **Django**、**Flask** 的安全外掛或其他許多系統所建立的密碼。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 10.1K bytes - Click Count (0) -
docs/zh/docs/tutorial/security/oauth2-jwt.md
因此,窃贼无法把该密码拿去尝试登录另一个系统(很多用户在各处都用相同的密码,这将非常危险)。 ## 安装 `pwdlib` { #install-pwdlib } pwdlib 是一个用于处理密码哈希的优秀 Python 包。 它支持多种安全的哈希算法以及相关工具。 推荐的算法是 “Argon2”。 请确保创建并激活一个[虚拟环境](../../virtual-environments.md),然后安装带 Argon2 的 pwdlib: <div class="termy"> ```console $ pip install "pwdlib[argon2]" ---> 100% ``` </div> /// tip | 提示 使用 `pwdlib`,你甚至可以把它配置为能够读取由 **Django**、**Flask** 安全插件或其他许多工具创建的密码。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 10.1K bytes - Click Count (0) -
docs/ja/docs/tutorial/security/oauth2-jwt.md
したがって、泥棒はそのパスワードを別のシステムで使えません(多くのユーザーはどこでも同じパスワードを使用しているため、危険性があります)。 ## `pwdlib` のインストール { #install-pwdlib } pwdlib は、パスワードのハッシュを処理するための優れたPythonパッケージです。 このパッケージは、多くの安全なハッシュアルゴリズムとユーティリティをサポートします。 推奨されるアルゴリズムは「Argon2」です。 [仮想環境](../../virtual-environments.md)を作成し、アクティベートしてから、Argon2付きでpwdlibをインストールしてください。 <div class="termy"> ```console $ pip install "pwdlib[argon2]" ---> 100% ``` </div> /// tip | 豆知識Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 14.6K bytes - Click Count (1) -
docs_src/security/tutorial005_an_py310.py
from fastapi.security import ( OAuth2PasswordBearer, OAuth2PasswordRequestForm, SecurityScopes, ) from jwt.exceptions import InvalidTokenError from pwdlib import PasswordHash from pydantic import BaseModel, ValidationError # to get a string like this run: # openssl rand -hex 32 SECRET_KEY = "09d25e094faa6ca2556c818166b7a9563b93f7099f6f0f4caa6cf63b88e8d3e7"
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 18:10:35 GMT 2026 - 5.4K bytes - Click Count (0) -
docs_src/security/tutorial004_an_py310.py
from typing import Annotated import jwt from fastapi import Depends, FastAPI, HTTPException, status from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm from jwt.exceptions import InvalidTokenError from pwdlib import PasswordHash from pydantic import BaseModel # to get a string like this run: # openssl rand -hex 32 SECRET_KEY = "09d25e094faa6ca2556c818166b7a9563b93f7099f6f0f4caa6cf63b88e8d3e7" ALGORITHM = "HS256"
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 18:10:35 GMT 2026 - 4.2K bytes - Click Count (0) -
docs_src/security/tutorial004_py310.py
import jwt from fastapi import Depends, FastAPI, HTTPException, status from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm from jwt.exceptions import InvalidTokenError from pwdlib import PasswordHash from pydantic import BaseModel # to get a string like this run: # openssl rand -hex 32 SECRET_KEY = "09d25e094faa6ca2556c818166b7a9563b93f7099f6f0f4caa6cf63b88e8d3e7" ALGORITHM = "HS256"
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 18:10:35 GMT 2026 - 4.1K bytes - Click Count (0) -
docs/zh-hant/docs/how-to/conditional-openapi.md
如果你想保護 API,有許多更好的作法,例如: - 確保針對請求本文與回應,具備定義良好的 Pydantic 模型。 - 透過依賴設定所需的權限與角色。 - 切勿儲存明文密碼,只儲存密碼雜湊。 - 實作並使用成熟且廣為人知的密碼學工具,例如 pwdlib 與 JWT 權杖等。 - 視需要以 OAuth2 scopes 新增更細緻的權限控管。 - ...等。 儘管如此,在某些特定情境下,你可能確實需要在某些環境(例如正式環境)停用 API 文件,或依據環境變數的設定來決定是否啟用。 ## 透過設定與環境變數的條件式 OpenAPI { #conditional-openapi-from-settings-and-env-vars }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 2.1K bytes - Click Count (0) -
docs/en/docs/how-to/conditional-openapi.md
* Configure any required permissions and roles using dependencies. * Never store plaintext passwords, only password hashes. * Implement and use well-known cryptographic tools, like pwdlib and JWT tokens, etc. * Add more granular permission controls with OAuth2 scopes where needed. * ...etc.
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 2.4K bytes - Click Count (0) -
docs_src/security/tutorial005_py310.py
from fastapi.security import ( OAuth2PasswordBearer, OAuth2PasswordRequestForm, SecurityScopes, ) from jwt.exceptions import InvalidTokenError from pwdlib import PasswordHash from pydantic import BaseModel, ValidationError # to get a string like this run: # openssl rand -hex 32 SECRET_KEY = "09d25e094faa6ca2556c818166b7a9563b93f7099f6f0f4caa6cf63b88e8d3e7"
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 18:10:35 GMT 2026 - 5.3K bytes - Click Count (0)