- Sort Score
- Num 10 results
- Language All
Results 31 - 40 of 100 for 401 (0.02 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
tests/test_security_api_key_cookie.py
assert response.json() == {"username": "secret"} def test_security_api_key_no_key(): client = TestClient(app) response = client.get("/users/me") assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "APIKey" def test_openapi_schema(): client = TestClient(app)
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 2.1K bytes - Click Count (0) -
tests/test_security_api_key_cookie_description.py
assert response.json() == {"username": "secret"} def test_security_api_key_no_key(): client = TestClient(app) response = client.get("/users/me") assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "APIKey" def test_openapi_schema(): client = TestClient(app)
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 2.3K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/URLConnectionTest.kt
server.enqueue(mockResponse) server.enqueue(mockResponse) val response = getResponse(newRequest("/")) assertThat(response.code).isEqualTo(401) assertThat(response.code).isEqualTo(401) assertThat(response.code).isEqualTo(401) assertThat(server.requestCount).isEqualTo(1) response.body.close() } @Test fun nonHexChunkSize() { server.enqueue(
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 133.3K bytes - Click Count (0) -
src/main/java/org/codelibs/fess/mylasta/direction/sponsor/FessApiFailureHook.java
// ========== protected static final int HTTP_BAD_REQUEST = 400; protected static final int HTTP_UNAUTHORIZED = 401; // =================================================================================== // Business FailureCreated: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Thu Jul 17 08:28:31 GMT 2025 - 5.8K bytes - Click Count (0) -
fastapi/security/api_key.py
""" The WWW-Authenticate header is not standardized for API Key authentication but the HTTP specification requires that an error of 401 "Unauthorized" must include a WWW-Authenticate header. Ref: https://datatracker.ietf.org/doc/html/rfc9110#name-401-unauthorized For this, this method sends a custom challenge `APIKey`. """ return HTTPException(Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 15 11:44:39 GMT 2026 - 9.6K bytes - Click Count (1) -
docs/zh/docs/tutorial/security/simple-oauth2.md
因此,在端点中,只有当用户存在、通过身份验证、且状态为激活时,才能获得该用户: {* ../../docs_src/security/tutorial003_an_py310.py hl[58:66,69:74,94] *} /// info | 信息 此处返回值为 `Bearer` 的响应头 `WWW-Authenticate` 也是规范的一部分。 任何 401“UNAUTHORIZED”HTTP(错误)状态码都应返回 `WWW-Authenticate` 响应头。 本例中,因为使用的是 Bearer Token,该响应头的值应为 `Bearer`。 实际上,忽略这个附加响应头,也不会有什么问题。 之所以在此提供这个附加响应头,是为了符合规范的要求。 说不定什么时候,就有工具用得上它,而且,开发者或用户也可能用得上。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/advanced/security/http-basic-auth.md
# HTTP Basic 認証 { #http-basic-auth } 最もシンプルなケースでは、HTTP Basic 認証を利用できます。 HTTP Basic 認証では、アプリケーションはユーザー名とパスワードを含むヘッダーを期待します。 それを受け取れない場合、HTTP 401 "Unauthorized" エラーを返します。 そして、値が `Basic` のヘッダー `WWW-Authenticate` を、任意の `realm` パラメータとともに返します。 これにより、ブラウザは組み込みのユーザー名とパスワード入力プロンプトを表示します。 その後、そのユーザー名とパスワードを入力すると、ブラウザはそれらをヘッダーに自動的に付与して送信します。 ## シンプルな HTTP Basic 認証 { #simple-http-basic-auth }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 6.4K bytes - Click Count (0) -
tests/test_security_oauth2.py
assert response.json() == {"username": "Other footokenbar"} def test_security_oauth2_password_bearer_no_header(): 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_strict_login_no_data(): response = client.post("/login")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 9.8K bytes - Click Count (0) -
docs/ja/docs/tutorial/security/simple-oauth2.md
{* ../../docs_src/security/tutorial003_an_py310.py hl[58:66,69:74,94] *} /// info | 情報 ここで返している値が `Bearer` の追加ヘッダー `WWW-Authenticate` も仕様の一部です。 HTTP(エラー)ステータスコード 401「UNAUTHORIZED」は、`WWW-Authenticate` ヘッダーも返すことになっています。 ベアラートークン(今回のケース)の場合、そのヘッダーの値は `Bearer` であるべきです。 実際のところ、この追加ヘッダーを省略しても動作はします。 しかし、仕様に準拠するためにここでは付与しています。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_include_router_defaults_overrides.py
callbacks=callback_router4.routes, deprecated=True, ) router4_default = APIRouter() @app.get( "/override1", tags=["path1a", "path1b"], responses={ 401: {"description": "Client error level 1"}, 501: {"description": "Server error level 1"}, }, deprecated=True, callbacks=callback_router1.routes, dependencies=[Depends(dep1)],Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 385.6K bytes - Click Count (0)