- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 78 for Authenticate (0.34 seconds)
-
fastapi/security/http.py
self.realm = realm self.auto_error = auto_error def make_authenticate_headers(self) -> dict[str, str]: if self.realm: return {"WWW-Authenticate": f'Basic realm="{self.realm}"'} return {"WWW-Authenticate": "Basic"} async def __call__( # type: ignore self, request: Request ) -> HTTPBasicCredentials | None: authorization = request.headers.get("Authorization")Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Mon Mar 16 10:16:48 GMT 2026 - 13.1K bytes - Click Count (0) -
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/ko/docs/advanced/security/http-basic-auth.md
가장 단순한 경우에는 HTTP Basic Auth를 사용할 수 있습니다. HTTP Basic Auth에서는 애플리케이션이 사용자명과 비밀번호가 들어 있는 헤더를 기대합니다. 이를 받지 못하면 HTTP 401 "Unauthorized" 오류를 반환합니다. 그리고 값이 `Basic`이고 선택적으로 `realm` 파라미터를 포함하는 `WWW-Authenticate` 헤더를 반환합니다. 이는 브라우저가 사용자명과 비밀번호를 입력하는 통합 프롬프트를 표시하도록 알려줍니다. 그다음 사용자명과 비밀번호를 입력하면, 브라우저가 자동으로 해당 값을 헤더에 담아 전송합니다. ## 간단한 HTTP Basic Auth { #simple-http-basic-auth }
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:06:26 GMT 2026 - 5.9K bytes - Click Count (0) -
docs/ja/docs/how-to/authentication-error-status-code.md
FastAPI バージョン `0.122.0` より前は、統合されたセキュリティユーティリティが認証に失敗してクライアントへエラーを返す際、HTTP ステータスコード `403 Forbidden` を使用していました。 FastAPI バージョン `0.122.0` 以降では、より適切な HTTP ステータスコード `401 Unauthorized` を使用し、HTTP 仕様に従ってレスポンスに妥当な `WWW-Authenticate` ヘッダーを含めます。[RFC 7235](https://datatracker.ietf.org/doc/html/rfc7235#section-3.1), [RFC 9110](https://datatracker.ietf.org/doc/html/rfc9110#name-401-unauthorized)。
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 1.4K bytes - Click Count (0) -
fastapi/security/api_key.py
def make_not_authenticated_error(self) -> HTTPException: """ 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-unauthorizedCreated: 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/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) -
docs/ko/docs/how-to/authentication-error-status-code.md
FastAPI 버전 `0.122.0`부터는 더 적절한 HTTP 상태 코드 `401 Unauthorized`를 사용하며, HTTP 명세인 [RFC 7235](https://datatracker.ietf.org/doc/html/rfc7235#section-3.1), [RFC 9110](https://datatracker.ietf.org/doc/html/rfc9110#name-401-unauthorized)를 따라 응답에 합리적인 `WWW-Authenticate` 헤더를 반환합니다. 하지만 어떤 이유로든 클라이언트가 이전 동작에 의존하고 있다면, 보안 클래스에서 `make_not_authenticated_error` 메서드를 오버라이드하여 이전 동작으로 되돌릴 수 있습니다. 예를 들어, 기본값인 `401 Unauthorized` 오류 대신 `403 Forbidden` 오류를 반환하는 `HTTPBearer`의 서브클래스를 만들 수 있습니다:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:06:26 GMT 2026 - 1.3K bytes - Click Count (0) -
docs/zh/docs/advanced/security/http-basic-auth.md
# HTTP 基础授权 { #http-basic-auth } 最简单的用例是使用 HTTP 基础授权(HTTP Basic Auth)。 在 HTTP 基础授权中,应用需要请求头包含用户名与密码。 如果没有接收到 HTTP 基础授权,就返回 HTTP 401 `"Unauthorized"` 错误。 并返回响应头 `WWW-Authenticate`,其值为 `Basic`,以及可选的 `realm` 参数。 HTTP 基础授权让浏览器显示内置的用户名与密码提示。 输入用户名与密码后,浏览器会把它们自动发送至请求头。 ## 简单的 HTTP 基础授权 { #simple-http-basic-auth } * 导入 `HTTPBasic` 与 `HTTPBasicCredentials` * 使用 `HTTPBasic` 创建**安全方案** * 在*路径操作*的依赖项中使用 `security`Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 4.4K bytes - Click Count (0) -
docs/recipes.md
public Authenticate() { client = new OkHttpClient.Builder() .authenticator(new Authenticator() { @Override public Request authenticate(Route route, Response response) throws IOException { if (response.request().header("Authorization") != null) { return null; // Give up, we've already attempted to authenticate. }Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sun Mar 15 09:01:42 GMT 2026 - 47.8K bytes - Click Count (0) -
ci/official/envs/rbe
fi else # The volume mapping flag below shares the user's gcloud credentials, if any, # with the container, in case the user has credentials stored there. # This would allow Bazel to authenticate for RBE. # Note: TF's CI does not have any credentials stored there. TFCI_DOCKER_ARGS="$TFCI_DOCKER_ARGS -v $HOME/.config/gcloud:/root/.config/gcloud"
Created: Tue Apr 07 12:39:13 GMT 2026 - Last Modified: Sat Mar 28 04:33:01 GMT 2026 - 2.7K bytes - Click Count (0)