Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 48 for tokenUrl (0.03 sec)

  1. docs_src/security/tutorial004_py310.py

        full_name: str | None = None
        disabled: bool | None = None
    
    
    class UserInDB(User):
        hashed_password: str
    
    
    password_hash = PasswordHash.recommended()
    
    oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
    
    app = FastAPI()
    
    
    def verify_password(plain_password, hashed_password):
        return password_hash.verify(plain_password, hashed_password)
    
    
    def get_password_hash(password):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Sep 29 02:57:38 UTC 2025
    - 4K bytes
    - Viewed (0)
  2. docs_src/security/tutorial004_py39.py

        disabled: Union[bool, None] = None
    
    
    class UserInDB(User):
        hashed_password: str
    
    
    password_hash = PasswordHash.recommended()
    
    oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
    
    app = FastAPI()
    
    
    def verify_password(plain_password, hashed_password):
        return password_hash.verify(plain_password, hashed_password)
    
    
    def get_password_hash(password):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 4.1K bytes
    - Viewed (0)
  3. docs/ja/docs/tutorial/security/first-steps.md

    その場合、**FastAPI**はそれを構築するためのツールも提供します。
    
    ///
    
    `OAuth2PasswordBearer` クラスのインスタンスを作成する時に、パラメーター`tokenUrl`を渡します。このパラメーターには、クライアント (ユーザーのブラウザで動作するフロントエンド) がトークンを取得するために`ユーザー名`と`パスワード`を送信するURLを指定します。
    
    {* ../../docs_src/security/tutorial001.py hl[6] *}
    
    /// tip | 豆知識
    
    ここで、`tokenUrl="token"`は、まだ作成していない相対URL`token`を指します。相対URLなので、`./token`と同じです。
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  4. docs_src/security/tutorial003_an_py310.py

            "disabled": True,
        },
    }
    
    app = FastAPI()
    
    
    def fake_hash_password(password: str):
        return "fakehashed" + password
    
    
    oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
    
    
    class User(BaseModel):
        username: str
        email: str | None = None
        full_name: str | None = None
        disabled: bool | None = None
    
    
    class UserInDB(User):
        hashed_password: str
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 24 19:03:06 UTC 2025
    - 2.5K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_security/test_tutorial003.py

                    },
                },
                "securitySchemes": {
                    "OAuth2PasswordBearer": {
                        "type": "oauth2",
                        "flows": {"password": {"scopes": {}, "tokenUrl": "token"}},
                    }
                },
            },
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 7.7K bytes
    - Viewed (0)
  6. tests/test_dependency_paramless.py

    from fastapi.security import (
        OAuth2PasswordBearer,
        SecurityScopes,
    )
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
    
    
    def process_auth(
        credentials: Annotated[Union[str, None], Security(oauth2_scheme)],
        security_scopes: SecurityScopes,
    ):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 2.3K bytes
    - Viewed (0)
  7. docs_src/security/tutorial005_py310.py

        disabled: bool | None = None
    
    
    class UserInDB(User):
        hashed_password: str
    
    
    password_hash = PasswordHash.recommended()
    
    oauth2_scheme = OAuth2PasswordBearer(
        tokenUrl="token",
        scopes={"me": "Read information about the current user.", "items": "Read items."},
    )
    
    app = FastAPI()
    
    
    def verify_password(plain_password, hashed_password):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Sep 29 02:57:38 UTC 2025
    - 5.2K bytes
    - Viewed (0)
  8. docs_src/security/tutorial005_an_py310.py

        disabled: bool | None = None
    
    
    class UserInDB(User):
        hashed_password: str
    
    
    password_hash = PasswordHash.recommended()
    
    oauth2_scheme = OAuth2PasswordBearer(
        tokenUrl="token",
        scopes={"me": "Read information about the current user.", "items": "Read items."},
    )
    
    app = FastAPI()
    
    
    def verify_password(plain_password, hashed_password):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Sep 29 02:57:38 UTC 2025
    - 5.3K bytes
    - Viewed (0)
  9. docs_src/security/tutorial005_an_py39.py

        disabled: Union[bool, None] = None
    
    
    class UserInDB(User):
        hashed_password: str
    
    
    password_hash = PasswordHash.recommended()
    
    oauth2_scheme = OAuth2PasswordBearer(
        tokenUrl="token",
        scopes={"me": "Read information about the current user.", "items": "Read items."},
    )
    
    app = FastAPI()
    
    
    def verify_password(plain_password, hashed_password):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Sep 29 02:57:38 UTC 2025
    - 5.3K bytes
    - Viewed (0)
  10. docs_src/security/tutorial004_an_py39.py

        disabled: Union[bool, None] = None
    
    
    class UserInDB(User):
        hashed_password: str
    
    
    password_hash = PasswordHash.recommended()
    
    oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
    
    app = FastAPI()
    
    
    def verify_password(plain_password, hashed_password):
        return password_hash.verify(plain_password, hashed_password)
    
    
    def get_password_hash(password):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Sep 29 02:57:38 UTC 2025
    - 4.2K bytes
    - Viewed (0)
Back to top