Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 106 for OAuth2 (0.23 seconds)

  1. docs/zh/docs/tutorial/security/simple-oauth2.md

    # OAuth2 实现简单的 Password 和 Bearer 验证 { #simple-oauth2-with-password-and-bearer }
    
    本章添加上一章示例中欠缺的部分,实现完整的安全流。
    
    ## 获取 `username` 和 `password` { #get-the-username-and-password }
    
    首先,使用 **FastAPI** 安全工具获取 `username` 和 `password`。
    
    OAuth2 规范要求使用“密码流”时,客户端或用户必须以表单数据形式发送 `username` 和 `password` 字段。
    
    并且,这两个字段必须命名为 `username` 和 `password`,不能使用 `user-name` 或 `email` 等其它名称。
    
    不过也不用担心,前端仍可以显示终端用户所需的名称。
    
    数据库模型也可以使用所需的名称。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 9K bytes
    - Click Count (0)
  2. docs/en/docs/tutorial/security/simple-oauth2.md

    # Simple OAuth2 with Password and Bearer { #simple-oauth2-with-password-and-bearer }
    
    Now let's build from the previous chapter and add the missing parts to have a complete security flow.
    
    ## Get the `username` and `password` { #get-the-username-and-password }
    
    We are going to use **FastAPI** security utilities to get the `username` and `password`.
    
    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)
  3. docs/zh-hant/docs/tutorial/security/simple-oauth2.md

    # 簡易 OAuth2:Password 與 Bearer { #simple-oauth2-with-password-and-bearer }
    
    現在從上一章延伸,補上缺少的部分,完成整個安全流程。
    
    ## 取得 `username` 與 `password` { #get-the-username-and-password }
    
    我們要使用 **FastAPI** 提供的安全性工具來取得 `username` 與 `password`。
    
    OAuth2 規範中,當使用「password flow」(我們現在使用的)時,用戶端/使用者必須以表單資料送出 `username` 與 `password` 欄位。
    
    而且規範要求欄位名稱必須就是這兩個,所以像是 `user-name` 或 `email` 都不行。
    
    但別擔心,你在前端要怎麼呈現給最終使用者都可以。
    
    而你的資料庫模型也可以使用任何你想要的欄位名稱。
    
    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)
  4. fastapi/security/__init__.py

    from .http import HTTPDigest as HTTPDigest
    from .oauth2 import OAuth2 as OAuth2
    from .oauth2 import OAuth2AuthorizationCodeBearer as OAuth2AuthorizationCodeBearer
    from .oauth2 import OAuth2PasswordBearer as OAuth2PasswordBearer
    from .oauth2 import OAuth2PasswordRequestForm as OAuth2PasswordRequestForm
    from .oauth2 import OAuth2PasswordRequestFormStrict as OAuth2PasswordRequestFormStrict
    from .oauth2 import SecurityScopes as SecurityScopes
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Dec 20 18:50:00 GMT 2020
    - 881 bytes
    - Click Count (0)
  5. docs/en/docs/tutorial/security/index.md

    OpenID Connect is another specification, based on **OAuth2**.
    
    It just extends OAuth2 specifying some things that are relatively ambiguous in OAuth2, to try to make it more interoperable.
    
    For example, Google login uses OpenID Connect (which underneath uses OAuth2).
    
    But Facebook login doesn't support OpenID Connect. It has its own flavor of OAuth2.
    
    ### OpenID (not "OpenID Connect") { #openid-not-openid-connect }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Aug 31 10:49:48 GMT 2025
    - 4.4K bytes
    - Click Count (0)
  6. docs/zh-hant/docs/tutorial/security/index.md

    ///
    
    ## OpenID Connect { #openid-connect }
    
    OpenID Connect 是基於 **OAuth2** 的另一套規範。
    
    它只是擴充了 OAuth2,釐清了 OAuth2 中相對模糊的部份,以提升互通性。
    
    例如,Google 登入使用的是 OpenID Connect(其底層使用 OAuth2)。
    
    但 Facebook 登入不支援 OpenID Connect,它有自己風格的 OAuth2。
    
    ### OpenID(不是「OpenID Connect」) { #openid-not-openid-connect }
    
    過去也有一個「OpenID」規範。它試圖解決與 **OpenID Connect** 相同的問題,但不是建立在 OAuth2 之上。
    
    因此,它是一套完全額外、獨立的系統。
    
    它現在並不流行,也很少被使用。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Feb 14 08:15:26 GMT 2026
    - 4.1K bytes
    - Click Count (0)
  7. docs/zh/docs/tutorial/security/index.md

    ///
    
    ## OpenID Connect { #openid-connect }
    
    OpenID Connect 是另一个基于 **OAuth2** 的规范。
    
    它只是扩展了 OAuth2,并明确了一些在 OAuth2 中相对模糊的内容,以尝试使其更具互操作性。
    
    例如,Google 登录使用 OpenID Connect(底层使用OAuth2)。
    
    但是 Facebook 登录不支持 OpenID Connect。它具有自己的 OAuth2 风格。
    
    ### OpenID(非「OpenID Connect」) { #openid-not-openid-connect }
    
    还有一个「OpenID」规范。它试图解决与 **OpenID Connect** 相同的问题,但它不是基于 OAuth2。
    
    因此,它是一个完整的附加系统。
    
    如今它已经不是很流行,没有被广泛使用了。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Feb 13 13:37:57 GMT 2026
    - 4.3K bytes
    - Click Count (0)
  8. docs/ja/docs/tutorial/security/index.md

    OAuth2は、通信を暗号化する方法を指定せず、アプリケーションがHTTPSで提供されることを想定しています。
    
    /// tip | 豆知識
    
    **デプロイ**のセクションでは、TraefikとLet's Encryptを使用して、無料でHTTPSを設定する方法が紹介されています。
    
    ///
    
    ## OpenID Connect { #openid-connect }
    
    OpenID Connectは、**OAuth2**をベースにした別の仕様です。
    
    これはOAuth2を拡張したもので、OAuth2ではやや曖昧だった部分を明確にし、より相互運用性を高めようとしたものです。
    
    例として、GoogleのログインはOpenID Connectを使用しています(これはOAuth2がベースになっています)。
    
    しかし、FacebookのログインはOpenID Connectをサポートしていません。OAuth2を独自にアレンジしています。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Feb 13 15:24:30 GMT 2026
    - 6.1K bytes
    - Click Count (0)
  9. docs/en/docs/reference/security/index.md

    ::: fastapi.security.HTTPBasicCredentials
    
    ## OAuth2 Authentication
    
    ::: fastapi.security.OAuth2
    
    ::: fastapi.security.OAuth2AuthorizationCodeBearer
    
    ::: fastapi.security.OAuth2PasswordBearer
    
    ## OAuth2 Password Form
    
    ::: fastapi.security.OAuth2PasswordRequestForm
    
    ::: fastapi.security.OAuth2PasswordRequestFormStrict
    
    ## OAuth2 Security Scopes in Dependencies
    
    ::: fastapi.security.SecurityScopes
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Feb 04 12:41:54 GMT 2026
    - 1.7K bytes
    - Click Count (0)
  10. tests/test_security_oauth2_authorization_code_bearer_scopes_openapi.py

                            },
                            "security": [{"OAuth2AuthorizationCodeBearer": []}],
                        }
                    },
                    "/with-oauth2-scheme": {
                        "get": {
                            "summary": "Read With Oauth2 Scheme",
                            "operationId": "read_with_oauth2_scheme_with_oauth2_scheme_get",
                            "responses": {
                                "200": {
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 6.6K bytes
    - Click Count (0)
Back to Top