- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 228 for me (0.07 sec)
-
tests/test_security_api_key_cookie_optional.py
return user @app.get("/users/me") def read_current_user(current_user: User = Depends(get_current_user)): if current_user is None: return {"msg": "Create an account first"} else: return current_user def test_security_api_key(): client = TestClient(app, cookies={"key": "secret"}) response = client.get("/users/me") assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.1K bytes - Viewed (0) -
tests/test_security_api_key_query_optional.py
return user @app.get("/users/me") def read_current_user(current_user: Optional[User] = Depends(get_current_user)): if current_user is None: return {"msg": "Create an account first"} return current_user client = TestClient(app) def test_security_api_key(): response = client.get("/users/me?key=secret") assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2K bytes - Viewed (0) -
build-logic/binary-compatibility/src/main/kotlin/gradlebuild/binarycompatibility/BinaryCompatibilityRepositoryLifecycle.kt
* limitations under the License. */ package gradlebuild.binarycompatibility import me.champeau.gradle.japicmp.report.PostProcessViolationsRule import me.champeau.gradle.japicmp.report.SetupRule import me.champeau.gradle.japicmp.report.ViolationCheckContext import me.champeau.gradle.japicmp.report.ViolationCheckContextWithViolations import java.io.File
Registered: Wed Nov 06 11:36:14 UTC 2024 - Last Modified: Wed Dec 09 08:14:05 UTC 2020 - 2.2K bytes - Viewed (0) -
docs/en/docs/help-fastapi.md
You can connect with <a href="https://tiangolo.com" class="external-link" target="_blank">me (Sebastián Ramírez / `tiangolo`)</a>, the author. You can: * <a href="https://github.com/tiangolo" class="external-link" target="_blank">Follow me on **GitHub**</a>. * See other Open Source projects I have created that could help you. * Follow me to see when I create a new Open Source project.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Aug 15 23:30:12 UTC 2024 - 13.7K bytes - Viewed (0) -
docs/zh/docs/advanced/security/oauth2-scopes.md
它们会为每个*路径操作*进行单独检查。 ## 查看文档 打开 API 文档,进行身份验证,并指定要授权的作用域。 <img src="/img/tutorial/security/image11.png"> 没有选择任何作用域,也可以进行**身份验证**,但访问 `/uses/me` 或 `/users/me/items` 时,会显示没有足够的权限。但仍可以访问 `/status/`。 如果选择了作用域 `me`,但没有选择作用域 `items`,则可以访问 `/users/me/`,但不能访问 `/users/me/items`。 这就是通过用户提供的令牌使用第三方应用访问这些*路径操作*时会发生的情况,具体怎样取决于用户授予第三方应用的权限。 ## 关于第三方集成 本例使用 OAuth2 **密码**流。 这种方式适用于登录我们自己的应用,最好使用我们自己的前端。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 11.8K bytes - Viewed (0) -
docs/em/docs/advanced/security/oauth2-scopes.md
<img src="/img/tutorial/security/image11.png"> 🚥 👆 🚫 🖊 🙆 ↔, 👆 🔜 "🔓", ✋️ 🕐❔ 👆 🔄 🔐 `/users/me/` ⚖️ `/users/me/items/` 👆 🔜 🤚 ❌ 💬 👈 👆 🚫 ✔️ 🥃 ✔. 👆 🔜 💪 🔐 `/status/`. & 🚥 👆 🖊 ↔ `me` ✋️ 🚫 ↔ `items`, 👆 🔜 💪 🔐 `/users/me/` ✋️ 🚫 `/users/me/items/`. 👈 ⚫️❔ 🔜 🔨 🥉 🥳 🈸 👈 🔄 🔐 1️⃣ 👫 *➡ 🛠️* ⏮️ 🤝 🚚 👩💻, ⚓️ 🔛 ❔ 📚 ✔ 👩💻 🤝 🈸. ## 🔃 🥉 🥳 🛠️
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 11K bytes - Viewed (0) -
tests/test_security_oauth2_optional.py
return form_data @app.get("/users/me") def read_users_me(current_user: Optional[User] = Depends(get_current_user)): if current_user is None: return {"msg": "Create an account first"} return current_user client = TestClient(app) def test_security_oauth2(): response = client.get("/users/me", headers={"Authorization": "Bearer footokenbar"})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 10.8K bytes - Viewed (0) -
docs_src/security/tutorial005_an_py310.py
) return Token(access_token=access_token, token_type="bearer") @app.get("/users/me/", response_model=User) async def read_users_me( current_user: Annotated[User, Depends(get_current_active_user)], ): return current_user @app.get("/users/me/items/") async def read_own_items( current_user: Annotated[User, Security(get_current_active_user, scopes=["items"])], ):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon May 20 17:37:28 UTC 2024 - 5.2K bytes - Viewed (0) -
docs_src/security/tutorial005_an_py39.py
) return Token(access_token=access_token, token_type="bearer") @app.get("/users/me/", response_model=User) async def read_users_me( current_user: Annotated[User, Depends(get_current_active_user)], ): return current_user @app.get("/users/me/items/") async def read_own_items( current_user: Annotated[User, Security(get_current_active_user, scopes=["items"])], ):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon May 20 17:37:28 UTC 2024 - 5.3K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005_an.py
def test_no_token(): response = client.get("/users/me") assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" def test_token(): access_token = get_access_token(scope="me") response = client.get( "/users/me", headers={"Authorization": f"Bearer {access_token}"} )
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 15.4K bytes - Viewed (0)