Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 81 - 90 of 196 for reauthenticate (0.09 seconds)

  1. src/main/java/jcifs/SmbTransportPool.java

         * @return whether any transport was still in use
         *
         * @throws CIFSException if an error occurs during authentication
         *
         */
        boolean close() throws CIFSException;
    
        /**
         * Authenticate arbitrary credentials represented by the
         * <code>NtlmPasswordAuthentication</code> object against the domain controller
         * specified by the <code>UniAddress</code> parameter. If the credentials are
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 16 01:32:48 GMT 2025
    - 7.5K bytes
    - Click Count (0)
  2. docs/zh-hant/docs/advanced/security/http-basic-auth.md

    # HTTP 基本認證 { #http-basic-auth }
    
    在最簡單的情況下,你可以使用 HTTP Basic 認證。
    
    在 HTTP Basic 認證中,應用程式會期待一個包含使用者名稱與密碼的標頭。
    
    如果沒有接收到,會回傳 HTTP 401「Unauthorized」錯誤。
    
    並回傳一個 `WWW-Authenticate` 標頭,其值為 `Basic`,以及可選的 `realm` 參數。
    
    這會告訴瀏覽器顯示內建的使用者名稱與密碼提示視窗。
    
    接著,當你輸入該使用者名稱與密碼時,瀏覽器會自動在標頭中送出它們。
    
    ## 簡單的 HTTP 基本認證 { #simple-http-basic-auth }
    
    - 匯入 `HTTPBasic` 與 `HTTPBasicCredentials`。
    - 使用 `HTTPBasic` 建立一個「`security` scheme」。
    - 在你的*路徑操作*中以依賴的方式使用該 `security`。
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 4.7K bytes
    - Click Count (0)
  3. docs/zh/docs/how-to/authentication-error-status-code.md

    # 使用旧的 403 认证错误状态码 { #use-old-403-authentication-error-status-codes }
    
    在 FastAPI `0.122.0` 版本之前,当内置的安全工具在认证失败后向客户端返回错误时,会使用 HTTP 状态码 `403 Forbidden`。
    
    从 FastAPI `0.122.0` 版本开始,它们改用更合适的 HTTP 状态码 `401 Unauthorized`,并在响应中返回合理的 `WWW-Authenticate` 头,遵循 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)。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 1.1K bytes
    - Click Count (0)
  4. docs/zh-hant/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 tokens(我們的情況)下,該標頭的值應該是 `Bearer`。
    
    其實你可以省略這個額外標頭,功能仍會正常。
    
    但此處加上它是為了遵循規範。
    
    同時也可能有工具會期待並使用它(現在或未來),而這可能對你或你的使用者有幫助,現在或未來皆然。
    
    這就是標準的好處...
    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)
  5. docs/en/docs/how-to/authentication-error-status-code.md

    Starting with FastAPI version `0.122.0`, they use the more appropriate HTTP status code `401 Unauthorized`, and return a sensible `WWW-Authenticate` header in the response, following the HTTP specifications, [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: Thu Mar 05 18:13:19 GMT 2026
    - 1.2K bytes
    - Click Count (0)
  6. docs/pt/docs/how-to/authentication-error-status-code.md

    A partir da versão `0.122.0` do FastAPI, eles usam o código de status HTTP `401 Unauthorized`, mais apropriado, e retornam um cabeçalho `WWW-Authenticate` adequado na response, seguindo as especificações 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).
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:20:43 GMT 2026
    - 1.2K bytes
    - Click Count (0)
  7. tests/test_security_api_key_cookie.py

        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)
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == snapshot(
    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)
  8. tests/test_security_api_key_cookie_description.py

        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)
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == snapshot(
    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)
  9. 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)
  10. docs_src/security/tutorial003_py310.py

        user = fake_decode_token(token)
        if not user:
            raise HTTPException(
                status_code=status.HTTP_401_UNAUTHORIZED,
                detail="Not authenticated",
                headers={"WWW-Authenticate": "Bearer"},
            )
        return user
    
    
    async def get_current_active_user(current_user: User = Depends(get_current_user)):
        if current_user.disabled:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Mon Nov 24 19:03:06 GMT 2025
    - 2.4K bytes
    - Click Count (0)
Back to Top