Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 113 for beggarer (0.19 sec)

  1. docs/en/docs/tutorial/security/first-steps.md

        * But it needs authentication for that specific endpoint.
        * So, to authenticate with our API, it sends a header `Authorization` with a value of `Bearer ` plus the token.
        * If the token contains `foobar`, the content of the `Authorization` header would be: `Bearer foobar`.
    
    ## **FastAPI**'s `OAuth2PasswordBearer`
    
    **FastAPI** provides several tools, at different levels of abstraction, to implement these security features.
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  2. docs_src/security/tutorial003_an.py

        if not user:
            raise HTTPException(
                status_code=status.HTTP_401_UNAUTHORIZED,
                detail="Invalid authentication credentials",
                headers={"WWW-Authenticate": "Bearer"},
            )
        return user
    
    
    async def get_current_active_user(
        current_user: Annotated[User, Depends(get_current_user)],
    ):
        if current_user.disabled:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  3. docs_src/security/tutorial003_an_py310.py

        if not user:
            raise HTTPException(
                status_code=status.HTTP_401_UNAUTHORIZED,
                detail="Invalid authentication credentials",
                headers={"WWW-Authenticate": "Bearer"},
            )
        return user
    
    
    async def get_current_active_user(
        current_user: Annotated[User, Depends(get_current_user)],
    ):
        if current_user.disabled:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  4. docs_src/security/tutorial003_py310.py

        if not user:
            raise HTTPException(
                status_code=status.HTTP_401_UNAUTHORIZED,
                detail="Invalid authentication credentials",
                headers={"WWW-Authenticate": "Bearer"},
            )
        return user
    
    
    async def get_current_active_user(current_user: User = Depends(get_current_user)):
        if current_user.disabled:
            raise HTTPException(status_code=400, detail="Inactive user")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 2.4K bytes
    - Viewed (0)
  5. docs/zh/docs/tutorial/security/index.md

    OpenAPI 有一种定义多个安全「方案」的方法。
    
    通过使用它们,你可以利用所有这些基于标准的工具,包括这些交互式文档系统。
    
    OpenAPI 定义了以下安全方案:
    
    * `apiKey`:一个特定于应用程序的密钥,可以来自:
        * 查询参数。
        * 请求头。
        * cookie。
    * `http`:标准的 HTTP 身份认证系统,包括:
        * `bearer`: 一个值为 `Bearer` 加令牌字符串的 `Authorization` 请求头。这是从 OAuth2 继承的。
        * HTTP Basic 认证方式。
        * HTTP Digest,等等。
    * `oauth2`:所有的 OAuth2 处理安全性的方式(称为「流程」)。
        *以下几种流程适合构建 OAuth 2.0 身份认证的提供者(例如 Google,Facebook,Twitter,GitHub 等):
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Jun 24 14:47:15 GMT 2023
    - 4.2K bytes
    - Viewed (0)
  6. docs/zh/docs/tutorial/security/simple-oauth2.md

    ```Python hl_lines="58-67  69-72  90"
    {!../../../docs_src/security/tutorial003.py!}
    ```
    
    !!! info "说明"
    
        此处返回值为 `Bearer` 的响应头 `WWW-Authenticate` 也是规范的一部分。
    
        任何 401**UNAUTHORIZED**HTTP(错误)状态码都应返回 `WWW-Authenticate` 响应头。
    
        本例中,因为使用的是 Bearer Token,该响应头的值应为 `Bearer`。
    
        实际上,忽略这个附加响应头,也不会有什么问题。
    
        之所以在此提供这个附加响应头,是为了符合规范的要求。
    
        说不定什么时候,就有工具用得上它,而且,开发者或用户也可能用得上。
    
        这就是遵循标准的好处……
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.8K bytes
    - Viewed (0)
  7. docs_src/security/tutorial005_an.py

    async def get_current_user(
        security_scopes: SecurityScopes, token: Annotated[str, Depends(oauth2_scheme)]
    ):
        if security_scopes.scopes:
            authenticate_value = f'Bearer scope="{security_scopes.scope_str}"'
        else:
            authenticate_value = "Bearer"
        credentials_exception = HTTPException(
            status_code=status.HTTP_401_UNAUTHORIZED,
            detail="Could not validate credentials",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  8. internal/config/lambda/target/webhook.go

    	// <Key> <Token> like format, if this is
    	// already present we can blindly use the
    	// authToken as is instead of adding 'Bearer'
    	tokens := strings.Fields(target.args.AuthToken)
    	switch len(tokens) {
    	case 2:
    		req.Header.Set("Authorization", target.args.AuthToken)
    	case 1:
    		req.Header.Set("Authorization", "Bearer "+target.args.AuthToken)
    	}
    
    	req.Header.Set("Content-Type", "application/json")
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Nov 17 20:02:26 GMT 2023
    - 6.7K bytes
    - Viewed (0)
  9. docs/em/docs/tutorial/security/index.md

    ⚙️ 👫, 👆 💪 ✊ 📈 🌐 👫 🐩-⚓️ 🧰, 🔌 👉 🎓 🧾 ⚙️.
    
    🗄 🔬 📄 💂‍♂ ⚖:
    
    * `apiKey`: 🈸 🎯 🔑 👈 💪 👟 ⚪️➡️:
        * 🔢 🔢.
        * 🎚.
        * 🍪.
    * `http`: 🐩 🇺🇸🔍 🤝 ⚙️, 🔌:
        * `bearer`: 🎚 `Authorization` ⏮️ 💲 `Bearer ` ➕ 🤝. 👉 😖 ⚪️➡️ Oauth2️⃣.
        * 🇺🇸🔍 🔰 🤝.
        * 🇺🇸🔍 📰, ♒️.
    * `oauth2`: 🌐 Oauth2️⃣ 🌌 🍵 💂‍♂ (🤙 "💧").
        * 📚 👫 💧 ☑ 🏗 ✳ 2️⃣.0️⃣ 🤝 🐕‍🦺 (💖 🇺🇸🔍, 👱📔, 👱📔, 📂, ♒️):
            * `implicit`
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Jun 24 14:47:15 GMT 2023
    - 3.5K bytes
    - Viewed (0)
  10. docs/de/docs/tutorial/security/simple-oauth2.md

        ```
    
    !!! info
        Der zusätzliche Header `WWW-Authenticate` mit dem Wert `Bearer`, den wir hier zurückgeben, ist ebenfalls Teil der Spezifikation.
    
        Jeder HTTP-(Fehler-)Statuscode 401 „UNAUTHORIZED“ soll auch einen `WWW-Authenticate`-Header zurückgeben.
    
        Im Fall von Bearer-Tokens (in unserem Fall) sollte der Wert dieses Headers `Bearer` lauten.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 18:08:44 GMT 2024
    - 14.3K bytes
    - Viewed (0)
Back to top