- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 36 for client_id (0.11 seconds)
-
fastapi/security/oauth2.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Mar 24 16:32:10 GMT 2026 - 23.6K bytes - Click Count (0) -
docs_src/websockets_/tutorial003_py310.py
<button>Send</button> </form> <ul id='messages'> </ul> <script> var client_id = Date.now() document.querySelector("#ws-id").textContent = client_id; var ws = new WebSocket(`ws://localhost:8000/ws/${client_id}`); ws.onmessage = function(event) { var messages = document.getElementById('messages')
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 27 12:34:37 GMT 2026 - 2.5K bytes - Click Count (0) -
tests/test_security_oauth2.py
) assert response.status_code == 200 assert response.json() == { "grant_type": "password", "username": "johndoe", "password": "secret", "scopes": [], "client_id": None, "client_secret": None, } def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.textCreated: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 9.8K bytes - Click Count (0) -
tests/test_security_oauth2_optional_description.py
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(): response = client.get("/openapi.json") assert response.status_code == 200, response.textCreated: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 9.9K bytes - Click Count (0) -
tests/test_security_oauth2_optional.py
) assert response.status_code == 200 assert response.json() == { "grant_type": "password", "username": "johndoe", "password": "secret", "scopes": [], "client_id": None, "client_secret": None, } def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.textCreated: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 9.8K bytes - Click Count (0) -
docs/en/docs/tutorial/security/simple-oauth2.md
If you need to enforce it, use `OAuth2PasswordRequestFormStrict` instead of `OAuth2PasswordRequestForm`. /// * An optional `client_id` (we don't need it for our example). * An optional `client_secret` (we don't need it for our example). /// info The `OAuth2PasswordRequestForm` is not a special class for **FastAPI** as is `OAuth2PasswordBearer`.
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 9.4K bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/security/simple-oauth2.md
- 可選的 `grant_type` /// tip 依規範,實際上需要一個 `grant_type` 欄位且固定值為 `password`,但 `OAuth2PasswordRequestForm` 並不會強制檢查。 如果你需要強制檢查,請改用 `OAuth2PasswordRequestFormStrict` 取代 `OAuth2PasswordRequestForm`。 /// - 可選的 `client_id`(本例不需要) - 可選的 `client_secret`(本例不需要) /// info `OAuth2PasswordRequestForm` 並不是像 `OAuth2PasswordBearer` 那樣對 **FastAPI** 來說的特殊類別。 `OAuth2PasswordBearer` 會讓 **FastAPI** 知道它是一個 security scheme,因此會以那種方式加入 OpenAPI。
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 9.1K bytes - Click Count (0) -
docs/zh/docs/tutorial/security/simple-oauth2.md
/// tip | 提示 实际上,OAuth2 规范*要求* `grant_type` 字段使用固定值 `password`,但 `OAuth2PasswordRequestForm` 没有作强制约束。 如需强制使用固定值 `password`,则不要用 `OAuth2PasswordRequestForm`,而是用 `OAuth2PasswordRequestFormStrict`。 /// * 可选的 `client_id`(本例未使用) * 可选的 `client_secret`(本例未使用) /// info | 信息 `OAuth2PasswordRequestForm` 并不像 `OAuth2PasswordBearer` 那样是 **FastAPI** 的特殊类。 **FastAPI** 把 `OAuth2PasswordBearer` 识别为安全方案。因此,可以通过这种方式把它添加至 OpenAPI。
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 9K bytes - Click Count (0) -
docs/ja/docs/tutorial/security/simple-oauth2.md
OAuth2 の仕様では、固定値 `password` を持つフィールド `grant_type` が実際には必須ですが、`OAuth2PasswordRequestForm` はそれを強制しません。 強制したい場合は、`OAuth2PasswordRequestForm` の代わりに `OAuth2PasswordRequestFormStrict` を使ってください。 /// - オプションの `client_id`(この例では不要) - オプションの `client_secret`(この例では不要) /// info | 情報 `OAuth2PasswordRequestForm` は、`OAuth2PasswordBearer` のように **FastAPI** にとって特別なクラスではありません。
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 12.1K bytes - Click Count (0) -
tests/test_enforce_once_required_parameter.py
from inline_snapshot import snapshot app = FastAPI() def _get_client_key(client_id: str = Query(...)) -> str: return f"{client_id}_key" def _get_client_tag(client_id: str | None = Query(None)) -> str | None: if client_id is None: return None return f"{client_id}_tag" @app.get("/foo") def foo_handler( client_key: str = Depends(_get_client_key),
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 4.1K bytes - Click Count (0)