Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 117 for secrets (0.21 sec)

  1. 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)
  2. .github/workflows/latest-changes.yml

              GITHUB_CONTEXT: ${{ toJson(github) }}
            run: echo "$GITHUB_CONTEXT"
          - uses: actions/checkout@v4
            with:
              # To allow latest-changes to commit to the main branch
              token: ${{ secrets.FASTAPI_LATEST_CHANGES }}
          # Allow debugging with tmate
          - name: Setup tmate session
            uses: mxschmitt/action-tmate@v3
    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)
  3. .github/actions/people/action.yml

    description: "Generate the data for the FastAPI People page"
    author: "Sebastiรกn Ramรญrez <******@****.***>"
    inputs:
      token:
        description: 'User token, to read the GitHub API. Can be passed in using {{ secrets.FASTAPI_PEOPLE }}'
        required: true
    runs:
      using: 'docker'
    Others
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Jul 09 15:44:40 GMT 2023
    - 333 bytes
    - Viewed (0)
  4. .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)
  5. 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)
  6. .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)
  7. docs/em/docs/advanced/security/http-basic-auth.md

    โš™๏ธ ๐Ÿ”— โœ… ๐Ÿšฅ ๐Ÿ†” &amp; ๐Ÿ” โ˜‘.
    
    ๐Ÿ‘‰, โš™๏ธ ๐Ÿ ๐Ÿฉ ๐Ÿ•น <a href="https://docs.python.org/3/library/secrets.html" class="external-link" target="_blank">`secrets`</a> โœ… ๐Ÿ†” &amp; ๐Ÿ”.
    
    `secrets.compare_digest()` ๐Ÿ’ช โœŠ `bytes` โš–๏ธ `str` ๐Ÿ‘ˆ ๐Ÿ•ด ๐Ÿ”Œ ๐Ÿ”  ๐Ÿฆน (๐Ÿ• ๐Ÿ‡ช๐Ÿ‡ธ), ๐Ÿ‘‰ โ›“ โšซ๏ธ ๐Ÿšซ๐Ÿ”œ ๐Ÿ‘ท โฎ๏ธ ๐Ÿฆน ๐Ÿ’– `รก`, `Sebastiรกn`.
    
    ๐Ÿต ๐Ÿ‘ˆ, ๐Ÿ‘ฅ ๐Ÿฅ‡ ๐Ÿ—œ `username` &amp; `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)
  8. 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)
  9. 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)
  10. .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)
Back to top