Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 138 for secret (0.21 sec)

  1. docs/em/docs/tutorial/security/simple-oauth2.md

        ๐Ÿšฅ ๐Ÿ‘† ๐Ÿ’ช ๐Ÿ› ๏ธ โšซ๏ธ, โš™๏ธ `OAuth2PasswordRequestFormStrict` โ†ฉ๏ธ `OAuth2PasswordRequestForm`.
    
    * ๐Ÿ“ฆ `client_id` (๐Ÿ‘ฅ ๐Ÿšซ ๐Ÿ’ช โšซ๏ธ ๐Ÿ‘† ๐Ÿ–ผ).
    * ๐Ÿ“ฆ `client_secret` (๐Ÿ‘ฅ ๐Ÿšซ ๐Ÿ’ช โšซ๏ธ ๐Ÿ‘† ๐Ÿ–ผ).
    
    !!! info
         `OAuth2PasswordRequestForm` ๐Ÿšซ ๐ŸŽ ๐ŸŽ“ **FastAPI** `OAuth2PasswordBearer`.
    
        `OAuth2PasswordBearer` โš’ **FastAPI** ๐Ÿ’ญ ๐Ÿ‘ˆ โšซ๏ธ ๐Ÿ’‚โ€โ™‚ โš–. โšซ๏ธ ๐Ÿšฎ ๐Ÿ‘ˆ ๐ŸŒŒ ๐Ÿ—„.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  2. docs/ja/docs/tutorial/security/oauth2-jwt.md

    ๆฌกใฎใ‚ˆใ†ใชใƒฆใƒผใ‚ถใƒผใ‚คใƒณใ‚ฟใƒผใƒ•ใ‚งใ‚คใ‚นใŒ่กจ็คบใ•ใ‚Œใพใ™๏ผš
    
    <img src="/img/tutorial/security/image07.png">
    
    ๅ‰ๅ›žใจๅŒใ˜ๆ–นๆณ•ใงใ‚ขใƒ—ใƒชใ‚ฑใƒผใ‚ทใƒงใƒณใฎ่ชๅฏใ‚’่กŒใ„ใพใ™ใ€‚
    
    ๆฌกใฎ่ช่จผๆƒ…ๅ ฑใ‚’ไฝฟ็”จใ—ใพใ™๏ผš
    
    Username: `johndoe`
    Password: `secret`
    
    !!! check "็ขบ่ช"
        ใ‚ณใƒผใƒ‰ใฎใฉใ“ใซใ‚‚ๅนณๆ–‡ใฎใƒ‘ใ‚นใƒฏใƒผใƒ‰"`secret`"ใฏใชใใ€ใƒใƒƒใ‚ทใƒฅๅŒ–ใ•ใ‚ŒใŸใ‚‚ใฎใ—ใ‹ใชใ„ใ“ใจใ‚’็ขบ่ชใ—ใฆใใ ใ•ใ„ใ€‚
    
    <img src="/img/tutorial/security/image08.png">
    
    ใ‚จใƒณใƒ‰ใƒใ‚คใƒณใƒˆ`/users/me/`ใ‚’ๅ‘ผใณๅ‡บใ™ใจใ€ๆฌกใฎใ‚ˆใ†ใชใƒฌใ‚นใƒใƒณใ‚นใŒๅพ—ใ‚‰ใ‚Œใพใ™๏ผš
    
    ```JSON
    {
      "username": "johndoe",
    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)
  3. .github/actions/people/app/main.py

        *,
        settings: Settings,
        query: str,
        after: Union[str, None] = None,
        category_id: Union[str, None] = None,
    ) -> Dict[str, Any]:
        headers = {"Authorization": f"token {settings.input_token.get_secret_value()}"}
        # category_id is only used by one query, but GraphQL allows unused variables, so
        # keep it here for simplicity
        variables = {"after": after, "category_id": category_id}
        response = httpx.post(
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 17:38:21 GMT 2024
    - 19.2K bytes
    - Viewed (1)
  4. docs_src/security/tutorial005_py310.py

        SecurityScopes,
    )
    from jose import JWTError, jwt
    from passlib.context import CryptContext
    from pydantic import BaseModel, ValidationError
    
    # to get a string like this run:
    # openssl rand -hex 32
    SECRET_KEY = "09d25e094faa6ca2556c818166b7a9563b93f7099f6f0f4caa6cf63b88e8d3e7"
    ALGORITHM = "HS256"
    ACCESS_TOKEN_EXPIRE_MINUTES = 30
    
    
    fake_users_db = {
        "johndoe": {
            "username": "johndoe",
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 5.1K bytes
    - Viewed (0)
  5. docs_src/security/tutorial005_an_py310.py

        SecurityScopes,
    )
    from jose import JWTError, jwt
    from passlib.context import CryptContext
    from pydantic import BaseModel, ValidationError
    
    # to get a string like this run:
    # openssl rand -hex 32
    SECRET_KEY = "09d25e094faa6ca2556c818166b7a9563b93f7099f6f0f4caa6cf63b88e8d3e7"
    ALGORITHM = "HS256"
    ACCESS_TOKEN_EXPIRE_MINUTES = 30
    
    
    fake_users_db = {
        "johndoe": {
            "username": "johndoe",
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  6. tests/test_security_oauth2_optional_description.py

            "/login",
            data={"username": "johndoe", "password": "secret", "grant_type": "password"},
        )
        assert response.status_code == 200, response.text
        assert response.json() == {
            "grant_type": "password",
            "username": "johndoe",
            "password": "secret",
            "scopes": [],
            "client_id": None,
            "client_secret": None,
        }
    
    
    def test_openapi_schema():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 10.9K bytes
    - Viewed (0)
  7. docs_src/app_testing/app_b_an_py39/main.py

        if x_token != fake_secret_token:
            raise HTTPException(status_code=400, detail="Invalid X-Token header")
        if item_id not in fake_db:
            raise HTTPException(status_code=404, detail="Item not found")
        return fake_db[item_id]
    
    
    @app.post("/items/", response_model=Item)
    async def create_item(item: Item, x_token: Annotated[str, Header()]):
        if x_token != fake_secret_token:
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 1.1K bytes
    - Viewed (0)
  8. docs_src/app_testing/app_b_an_py310/main.py

        if x_token != fake_secret_token:
            raise HTTPException(status_code=400, detail="Invalid X-Token header")
        if item_id not in fake_db:
            raise HTTPException(status_code=404, detail="Item not found")
        return fake_db[item_id]
    
    
    @app.post("/items/", response_model=Item)
    async def create_item(item: Item, x_token: Annotated[str, Header()]):
        if x_token != fake_secret_token:
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 1.1K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_dependencies/test_tutorial012_an_py39.py

            "/items/", headers={"X-Token": "fake-super-secret-token", "X-Key": "invalid"}
        )
        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "X-Key header invalid"}
    
    
    @needs_py39
    def test_get_invalid_second_header_users(client: TestClient):
        response = client.get(
            "/users/", headers={"X-Token": "fake-super-secret-token", "X-Key": "invalid"}
        )
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 8.8K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_security/test_tutorial003_an.py

                                {"title": "Client Id", "type": "string"}
                            ),
                            "client_secret": IsDict(
                                {
                                    "title": "Client Secret",
                                    "anyOf": [{"type": "string"}, {"type": "null"}],
                                }
                            )
                            | IsDict(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 8K bytes
    - Viewed (0)
Back to top