Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 48 for tokenUrl (0.03 sec)

  1. fess-crawler/src/main/java/org/codelibs/fess/crawler/client/http/form/FormScheme.java

            final String tokenUrl = getParameter(TOKEN_URL);
            final String tokenPattern = getParameter(TOKEN_PATTERN);
            final List<Pair<String, String>> responseParams = new ArrayList<>();
            final String encoding = getParameter(ENCODING);
            if (StringUtil.isNotBlank(tokenUrl) && StringUtil.isNotBlank(tokenPattern)) {
    Registered: Sat Dec 20 11:21:39 UTC 2025
    - Last Modified: Sun Jul 06 02:13:03 UTC 2025
    - 14.3K bytes
    - Viewed (1)
  2. tests/test_security_oauth2_authorization_code_bearer_description.py

    from fastapi.security import OAuth2AuthorizationCodeBearer
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    oauth2_scheme = OAuth2AuthorizationCodeBearer(
        authorizationUrl="authorize",
        tokenUrl="token",
        description="OAuth2 Code Bearer",
        auto_error=True,
    )
    
    
    @app.get("/items/")
    async def read_items(token: Optional[str] = Security(oauth2_scheme)):
        return {"token": token}
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  3. tests/test_security_oauth2_password_bearer_optional.py

    from typing import Optional
    
    from fastapi import FastAPI, Security
    from fastapi.security import OAuth2PasswordBearer
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    oauth2_scheme = OAuth2PasswordBearer(tokenUrl="/token", auto_error=False)
    
    
    @app.get("/items/")
    async def read_items(token: Optional[str] = Security(oauth2_scheme)):
        if token is None:
            return {"msg": "Create an account first"}
        return {"token": token}
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  4. tests/test_security_oauth2_authorization_code_bearer.py

    from fastapi.security import OAuth2AuthorizationCodeBearer
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    oauth2_scheme = OAuth2AuthorizationCodeBearer(
        authorizationUrl="authorize", tokenUrl="token", auto_error=True
    )
    
    
    @app.get("/items/")
    async def read_items(token: Optional[str] = Security(oauth2_scheme)):
        return {"token": token}
    
    
    client = TestClient(app)
    
    
    def test_no_token():
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  5. tests/test_security_oauth2_password_bearer_optional_description.py

    from typing import Optional
    
    from fastapi import FastAPI, Security
    from fastapi.security import OAuth2PasswordBearer
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    oauth2_scheme = OAuth2PasswordBearer(
        tokenUrl="/token",
        description="OAuth2PasswordBearer security scheme",
        auto_error=False,
    )
    
    
    @app.get("/items/")
    async def read_items(token: Optional[str] = Security(oauth2_scheme)):
        if token is None:
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  6. docs/ru/docs/tutorial/security/first-steps.md

    ///
    
    При создании экземпляра класса `OAuth2PasswordBearer` мы передаем параметр `tokenUrl`. Этот параметр содержит URL, который клиент (фронтенд, работающий в браузере пользователя) будет использовать для отправки `username` и `password`, чтобы получить токен.
    
    {* ../../docs_src/security/tutorial001_an_py39.py hl[8] *}
    
    /// tip | Подсказка
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Sep 30 11:24:39 UTC 2025
    - 14.2K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/security/first-steps.md

    ///
    
    When we create an instance of the `OAuth2PasswordBearer` class we pass in the `tokenUrl` parameter. This parameter contains the URL that the client (the frontend running in the user's browser) will use to send the `username` and `password` in order to get a token.
    
    {* ../../docs_src/security/tutorial001_an_py39.py hl[8] *}
    
    /// tip
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 8.4K bytes
    - Viewed (0)
  8. docs/de/docs/tutorial/security/first-steps.md

    {* ../../docs_src/security/tutorial001_an_py39.py hl[8] *}
    
    /// tip | Tipp
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Sep 20 15:10:09 UTC 2025
    - 9.9K bytes
    - Viewed (0)
  9. docs/zh/docs/tutorial/security/first-steps.md

    甚至可以说,它是适用于绝大多数用例的最佳方案,除非您是 OAuth2 的专家,知道为什么其它方案更合适。
    
    本例中,**FastAPI** 还提供了构建工具。
    
    ///
    
    创建 `OAuth2PasswordBearer` 的类实例时,要传递 `tokenUrl` 参数。该参数包含客户端(用户浏览器中运行的前端) 的 URL,用于发送 `username` 与 `password`,并获取令牌。
    
    {* ../../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
    - 7K bytes
    - Viewed (0)
  10. docs_src/security/tutorial002_py39.py

    from typing import Union
    
    from fastapi import Depends, FastAPI
    from fastapi.security import OAuth2PasswordBearer
    from pydantic import BaseModel
    
    app = FastAPI()
    
    oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
    
    
    class User(BaseModel):
        username: str
        email: Union[str, None] = None
        full_name: Union[str, None] = None
        disabled: Union[bool, None] = None
    
    
    def fake_decode_token(token):
        return User(
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 755 bytes
    - Viewed (0)
Back to top