Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 85 for Feyrer (0.18 sec)

  1. tests/test_security_oauth2_authorization_code_bearer.py

        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Not authenticated"}
    
    
    def test_token():
        response = client.get("/items", headers={"Authorization": "Bearer testtoken"})
        assert response.status_code == 200, response.text
        assert response.json() == {"token": "testtoken"}
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.3K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_security/test_tutorial005_an_py39.py

        assert response.json() == {"detail": "Not authenticated"}
        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    @needs_py39
    def test_token(client: TestClient):
        access_token = get_access_token(scope="me", client=client)
        response = client.get(
            "/users/me", headers={"Authorization": f"Bearer {access_token}"}
        )
        assert response.status_code == 200, response.text
        assert response.json() == {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.3K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_security/test_tutorial005_py310.py

        assert response.json() == {"detail": "Not authenticated"}
        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    @needs_py310
    def test_token(client: TestClient):
        access_token = get_access_token(scope="me", client=client)
        response = client.get(
            "/users/me", headers={"Authorization": f"Bearer {access_token}"}
        )
        assert response.status_code == 200, response.text
        assert response.json() == {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.3K bytes
    - Viewed (0)
  4. tests/test_security_openid_connect_optional.py

        return current_user
    
    
    client = TestClient(app)
    
    
    def test_security_oauth2():
        response = client.get("/users/me", headers={"Authorization": "Bearer footokenbar"})
        assert response.status_code == 200, response.text
        assert response.json() == {"username": "Bearer footokenbar"}
    
    
    def test_security_oauth2_password_other_header():
        response = client.get("/users/me", headers={"Authorization": "Other footokenbar"})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.4K bytes
    - Viewed (0)
  5. docs/de/docs/tutorial/security/first-steps.md

        * Um sich also bei unserer API zu authentifizieren, sendet es einen Header `Authorization` mit dem Wert `Bearer` plus dem Token.
        * Wenn der Token `foobar` enthielte, wäre der Inhalt des `Authorization`-Headers: `Bearer foobar`.
    
    ## **FastAPI**s `OAuth2PasswordBearer`
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 18:07:08 GMT 2024
    - 10.3K bytes
    - Viewed (0)
  6. docs_src/security/tutorial004_py310.py

                headers={"WWW-Authenticate": "Bearer"},
            )
        access_token_expires = timedelta(minutes=ACCESS_TOKEN_EXPIRE_MINUTES)
        access_token = create_access_token(
            data={"sub": user.username}, expires_delta=access_token_expires
        )
        return Token(access_token=access_token, token_type="bearer")
    
    
    @app.get("/users/me/", response_model=User)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 4K bytes
    - Viewed (0)
  7. fastapi/security/api_key.py

                    It is also useful when you want to have authentication that can be
                    provided in one of multiple optional ways (for example, in a query
                    parameter or in an HTTP Bearer token).
                    """
                ),
            ] = True,
        ):
            self.model: APIKey = APIKey(
                **{"in": APIKeyIn.query},  # type: ignore[arg-type]
                name=name,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 23 22:29:18 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  8. docs/de/docs/tutorial/security/index.md

        * Einem Query-Parameter.
        * Einem Header.
        * Einem Cookie.
    * `http`: Standard-HTTP-Authentifizierungssysteme, einschließlich:
        * `bearer`: ein Header `Authorization` mit dem Wert `Bearer` plus einem Token. Dies wird von OAuth2 geerbt.
        * HTTP Basic Authentication.
        * HTTP Digest, usw.
    * `oauth2`: Alle OAuth2-Methoden zum Umgang mit Sicherheit (genannt „Flows“).
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 18:09:35 GMT 2024
    - 5K bytes
    - Viewed (0)
  9. docs/zh/docs/tutorial/security/index.md

    OpenAPI 有一种定义多个安全「方案」的方法。
    
    通过使用它们,你可以利用所有这些基于标准的工具,包括这些交互式文档系统。
    
    OpenAPI 定义了以下安全方案:
    
    * `apiKey`:一个特定于应用程序的密钥,可以来自:
        * 查询参数。
        * 请求头。
        * cookie。
    * `http`:标准的 HTTP 身份认证系统,包括:
        * `bearer`: 一个值为 `Bearer` 加令牌字符串的 `Authorization` 请求头。这是从 OAuth2 继承的。
        * HTTP Basic 认证方式。
        * HTTP Digest,等等。
    * `oauth2`:所有的 OAuth2 处理安全性的方式(称为「流程」)。
        *以下几种流程适合构建 OAuth 2.0 身份认证的提供者(例如 Google,Facebook,Twitter,GitHub 等):
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Jun 24 14:47:15 GMT 2023
    - 4.2K bytes
    - Viewed (0)
  10. docs/em/docs/tutorial/security/index.md

    ⚙️ 👫, 👆 💪 ✊ 📈 🌐 👫 🐩-⚓️ 🧰, 🔌 👉 🎓 🧾 ⚙️.
    
    🗄 🔬 📄 💂‍♂ ⚖:
    
    * `apiKey`: 🈸 🎯 🔑 👈 💪 👟 ⚪️➡️:
        * 🔢 🔢.
        * 🎚.
        * 🍪.
    * `http`: 🐩 🇺🇸🔍 🤝 ⚙️, 🔌:
        * `bearer`: 🎚 `Authorization` ⏮️ 💲 `Bearer ` ➕ 🤝. 👉 😖 ⚪️➡️ Oauth2️⃣.
        * 🇺🇸🔍 🔰 🤝.
        * 🇺🇸🔍 📰, ♒️.
    * `oauth2`: 🌐 Oauth2️⃣ 🌌 🍵 💂‍♂ (🤙 "💧").
        * 📚 👫 💧 ☑ 🏗 ✳ 2️⃣.0️⃣ 🤝 🐕‍🦺 (💖 🇺🇸🔍, 👱📔, 👱📔, 📂, ♒️):
            * `implicit`
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Jun 24 14:47:15 GMT 2023
    - 3.5K bytes
    - Viewed (0)
Back to top