- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 117 for secrets (0.21 sec)
-
docs_src/security/tutorial007_an.py
current_username_bytes, correct_username_bytes ) current_password_bytes = credentials.password.encode("utf8") correct_password_bytes = b"swordfish" is_correct_password = secrets.compare_digest( current_password_bytes, correct_password_bytes ) if not (is_correct_username and is_correct_password): raise HTTPException( status_code=status.HTTP_401_UNAUTHORIZED,
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 1.2K bytes - Viewed (0) -
.github/workflows/latest-changes.yml
Others - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Jan 09 14:57:33 GMT 2024 - 1.4K bytes - Viewed (0) -
.github/actions/people/action.yml
Others - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sun Jul 09 15:44:40 GMT 2023 - 333 bytes - Viewed (0) -
.github/workflows/smokeshow.yml
SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 100 SMOKESHOW_GITHUB_CONTEXT: coverage SMOKESHOW_GITHUB_TOKEN: ${{ secrets.FASTAPI_SMOKESHOW_UPLOAD }} SMOKESHOW_GITHUB_PR_HEAD_SHA: ${{ github.event.workflow_run.head_sha }}
Others - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 19 01:33:28 GMT 2024 - 1.1K bytes - Viewed (0) -
docs_src/security/tutorial007.py
import secrets from fastapi import Depends, FastAPI, HTTPException, status from fastapi.security import HTTPBasic, HTTPBasicCredentials app = FastAPI() security = HTTPBasic() def get_current_username(credentials: HTTPBasicCredentials = Depends(security)): current_username_bytes = credentials.username.encode("utf8") correct_username_bytes = b"stanleyjobson" is_correct_username = secrets.compare_digest(
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jan 11 14:33:05 GMT 2024 - 1.1K bytes - Viewed (0) -
.github/workflows/build-docs.yml
if: ( github.event_name != 'pull_request' || github.secret_source == 'Actions' ) && steps.cache.outputs.cache-hit != 'true' run: | pip install git+https://${{ secrets.FASTAPI_MKDOCS_MATERIAL_INSIDERS }}@github.com/squidfunk/mkdocs-material-insiders.git pip install git+https://${{ secrets.FASTAPI_MKDOCS_MATERIAL_INSIDERS }}@github.com/pawamoy-insiders/griffe-typing-deprecated.git
Others - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Apr 02 03:12:00 GMT 2024 - 4.8K bytes - Viewed (0) -
docs/em/docs/advanced/security/http-basic-auth.md
โ๏ธ ๐ โ ๐ฅ ๐ & ๐ โ. ๐, โ๏ธ ๐ ๐ฉ ๐น <a href="https://docs.python.org/3/library/secrets.html" class="external-link" target="_blank">`secrets`</a> โ ๐ & ๐. `secrets.compare_digest()` ๐ช โ `bytes` โ๏ธ `str` ๐ ๐ด ๐ ๐ ๐ฆน (๐ ๐ช๐ธ), ๐ โ โซ๏ธ ๐ซ๐ ๐ท โฎ๏ธ ๐ฆน ๐ `รก`, `Sebastiรกn`. ๐ต ๐, ๐ฅ ๐ฅ ๐ `username` & `password` `bytes` ๐ข ๐ซ โฎ๏ธ ๐ -8๏ธโฃ.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Apr 01 09:26:04 GMT 2023 - 4.1K bytes - Viewed (0) -
docs/en/docs/advanced/security/http-basic-auth.md
Use a dependency to check if the username and password are correct. For this, use the Python standard module <a href="https://docs.python.org/3/library/secrets.html" class="external-link" target="_blank">`secrets`</a> to check the username and password. `secrets.compare_digest()` needs to take `bytes` or a `str` that only contains ASCII characters (the ones in English), this means it wouldn't work with characters like `รก`, as in `Sebastiรกn`.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jan 11 14:33:05 GMT 2024 - 5.9K bytes - Viewed (0) -
docs_src/security/tutorial007_an_py39.py
current_username_bytes, correct_username_bytes ) current_password_bytes = credentials.password.encode("utf8") correct_password_bytes = b"swordfish" is_correct_password = secrets.compare_digest( current_password_bytes, correct_password_bytes ) if not (is_correct_username and is_correct_password): raise HTTPException( status_code=status.HTTP_401_UNAUTHORIZED,
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 1.1K bytes - Viewed (0) -
.github/workflows/deploy-docs.yml
id: deploy uses: cloudflare/pages-action@v1 with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} projectName: fastapitiangolo directory: './site' gitHubToken: ${{ secrets.GITHUB_TOKEN }}
Others - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 19 01:33:28 GMT 2024 - 1.6K bytes - Viewed (0)