Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 38 for expiry (0.14 sec)

  1. docs_src/security/tutorial004.py

            return False
        return user
    
    
    def create_access_token(data: dict, expires_delta: Union[timedelta, None] = None):
        to_encode = data.copy()
        if expires_delta:
            expire = datetime.now(timezone.utc) + expires_delta
        else:
            expire = datetime.now(timezone.utc) + timedelta(minutes=15)
        to_encode.update({"exp": expire})
        encoded_jwt = jwt.encode(to_encode, SECRET_KEY, algorithm=ALGORITHM)
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 4K bytes
    - Viewed (0)
  2. docs_src/security/tutorial004_an.py

            return False
        return user
    
    
    def create_access_token(data: dict, expires_delta: Union[timedelta, None] = None):
        to_encode = data.copy()
        if expires_delta:
            expire = datetime.now(timezone.utc) + expires_delta
        else:
            expire = datetime.now(timezone.utc) + timedelta(minutes=15)
        to_encode.update({"exp": expire})
        encoded_jwt = jwt.encode(to_encode, SECRET_KEY, algorithm=ALGORITHM)
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  3. docs/ru/docs/deployment/docker.md

    # (1)
    FROM python:3.9 as requirements-stage
    
    # (2)
    WORKDIR /tmp
    
    # (3)
    RUN pip install poetry
    
    # (4)
    COPY ./pyproject.toml ./poetry.lock* /tmp/
    
    # (5)
    RUN poetry export -f requirements.txt --output requirements.txt --without-hashes
    
    # (6)
    FROM python:3.9
    
    # (7)
    WORKDIR /code
    
    # (8)
    COPY --from=requirements-stage /tmp/requirements.txt /code/requirements.txt
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 57.5K bytes
    - Viewed (0)
  4. docs_src/security/tutorial004_an_py310.py

            return False
        return user
    
    
    def create_access_token(data: dict, expires_delta: timedelta | None = None):
        to_encode = data.copy()
        if expires_delta:
            expire = datetime.now(timezone.utc) + expires_delta
        else:
            expire = datetime.now(timezone.utc) + timedelta(minutes=15)
        to_encode.update({"exp": expire})
        encoded_jwt = jwt.encode(to_encode, SECRET_KEY, algorithm=ALGORITHM)
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  5. docs_src/security/tutorial005_an.py

            return False
        return user
    
    
    def create_access_token(data: dict, expires_delta: Union[timedelta, None] = None):
        to_encode = data.copy()
        if expires_delta:
            expire = datetime.now(timezone.utc) + expires_delta
        else:
            expire = datetime.now(timezone.utc) + timedelta(minutes=15)
        to_encode.update({"exp": expire})
        encoded_jwt = jwt.encode(to_encode, SECRET_KEY, algorithm=ALGORITHM)
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/security/first-steps.md

        * A "token" is just a string with some content that we can use later to verify this user.
        * Normally, a token is set to expire after some time.
            * So, the user will have to log in again at some point later.
            * And if the token is stolen, the risk is less. It is not like a permanent key that will work forever (in most of the cases).
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  7. docs/en/docs/deployment/https.md

    * For HTTPS, **the server** needs to **have "certificates"** generated by a **third party**.
        * Those certificates are actually **acquired** from the third party, not "generated".
    * Certificates have a **lifetime**.
        * They **expire**.
        * And then they need to be **renewed**, **acquired again** from the third party.
    * The encryption of the connection happens at the **TCP level**.
        * That's one layer **below HTTP**.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 12K bytes
    - Viewed (0)
  8. docs/em/docs/advanced/settings.md

    ๐Ÿ‘† ๐Ÿ’ช โœ & โš™๏ธ ๐ŸŒ ๐Ÿ”ข ๐Ÿš, ๐Ÿต ๐Ÿ’†โ€โ™‚ ๐Ÿ:
    
    === "๐Ÿ’พ, ๐Ÿ‡ธ๐Ÿ‡ป, ๐Ÿšช ๐ŸŽ‰"
    
        <div class="termy">
    
        ```console
        // You could create an env var MY_NAME with
        $ export MY_NAME="Wade Wilson"
    
        // Then you could use it with other programs, like
        $ echo "Hello $MY_NAME"
    
        Hello Wade Wilson
        ```
    
        </div>
    
    === "๐Ÿšช ๐Ÿ“‹"
    
        <div class="termy">
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 11.4K bytes
    - Viewed (0)
  9. docs/en/docs/fastapi-people.md

    They have proven to be **FastAPI Experts** by helping many others. โœจ
    
    !!! tip
        You could become an official FastAPI Expert too!
    
        Just [help others with questions in GitHub](help-fastapi.md#help-others-with-questions-in-github){.internal-link target=_blank}. ๐Ÿค“
    
    You can see the **FastAPI Experts** for:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 16 23:54:24 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  10. docs/ja/docs/tutorial/security/oauth2-jwt.md

    ```
    
    </div>
    
    ใใ—ใฆใ€ๅ‡บๅŠ›ใ•ใ‚ŒใŸๆ–‡ๅญ—ๅˆ—ใ‚’ๅค‰ๆ•ฐ`SECRET_KEY`ใซใ‚ณใƒ”ใƒผใ—ใพใ™ใ€‚๏ผˆไพ‹ใซ่จ˜่ผ‰ใ—ใฆใ„ใ‚‹็ง˜ๅฏ†้ตใฏๅฎŸ้š›ใซไฝฟ็”จใ—ใชใ„ใงใใ ใ•ใ„๏ผ‰
    
    JWTใƒˆใƒผใ‚ฏใƒณใฎ็ฝฒๅใซไฝฟ็”จใ™ใ‚‹ใ‚ขใƒซใ‚ดใƒชใ‚บใƒ `"HS256"`ใ‚’ๆŒ‡ๅฎšใ—ใŸๅค‰ๆ•ฐ`ALGORITHM`ใ‚’ไฝœๆˆใ—ใพใ™ใ€‚
    
    ใƒˆใƒผใ‚ฏใƒณใฎๆœ‰ๅŠนๆœŸ้™ใ‚’ๆŒ‡ๅฎšใ—ใŸๅค‰ๆ•ฐ`ACCESS_TOKEN_EXPIRE_MINUTES`ใ‚’ไฝœๆˆใ—ใพใ™ใ€‚
    
    ใƒฌใ‚นใƒใƒณใ‚นใฎใƒˆใƒผใ‚ฏใƒณใ‚จใƒณใƒ‰ใƒใ‚คใƒณใƒˆใงไฝฟ็”จใ™ใ‚‹Pydanticใƒขใƒ‡ใƒซใ‚’ๅฎš็พฉใ—ใพใ™ใ€‚
    
    ๆ–ฐใ—ใ„ใ‚ขใ‚ฏใ‚ปใ‚นใƒˆใƒผใ‚ฏใƒณใ‚’็”Ÿๆˆใ™ใ‚‹ใƒฆใƒผใƒ†ใ‚ฃใƒชใƒ†ใ‚ฃ้–ขๆ•ฐใ‚’ไฝœๆˆใ—ใพใ™ใ€‚
    
    ```Python hl_lines="6  12-14  28-30  78-86"
    {!../../../docs_src/security/tutorial004.py!}
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 21:21:35 GMT 2024
    - 14.1K bytes
    - Viewed (0)
Back to top