Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 79 for 401 (0.15 sec)

  1. tests/test_tutorial/test_security/test_tutorial006.py

        assert response.status_code == 401, response.text
        assert response.headers["WWW-Authenticate"] == "Basic"
    
    
    def test_security_http_basic_invalid_credentials():
        response = client.get(
            "/users/me", headers={"Authorization": "Basic notabase64token"}
        )
        assert response.status_code == 401, response.text
        assert response.headers["WWW-Authenticate"] == "Basic"
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.3K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_security/test_tutorial005_an_py310.py

        assert response.json() == {"detail": "Incorrect username or password"}
    
    
    @needs_py310
    def test_no_token(client: TestClient):
        response = client.get("/users/me")
        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Not authenticated"}
        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    @needs_py310
    def test_token(client: TestClient):
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.3K bytes
    - Viewed (0)
  3. tests/test_security_http_basic_realm.py

        assert response.status_code == 401, response.text
        assert response.headers["WWW-Authenticate"] == 'Basic realm="simple"'
    
    
    def test_security_http_basic_invalid_credentials():
        response = client.get(
            "/users/me", headers={"Authorization": "Basic notabase64token"}
        )
        assert response.status_code == 401, response.text
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.6K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_security/test_tutorial006_an_py39.py

        assert response.status_code == 401, response.text
        assert response.headers["WWW-Authenticate"] == "Basic"
    
    
    @needs_py39
    def test_security_http_basic_invalid_credentials(client: TestClient):
        response = client.get(
            "/users/me", headers={"Authorization": "Basic notabase64token"}
        )
        assert response.status_code == 401, response.text
        assert response.headers["WWW-Authenticate"] == "Basic"
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.5K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_security/test_tutorial005_an_py39.py

        assert response.json() == {"detail": "Incorrect username or password"}
    
    
    @needs_py39
    def test_no_token(client: TestClient):
        response = client.get("/users/me")
        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Not authenticated"}
        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    @needs_py39
    def test_token(client: TestClient):
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.3K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_security/test_tutorial005_py310.py

        assert response.json() == {"detail": "Incorrect username or password"}
    
    
    @needs_py310
    def test_no_token(client: TestClient):
        response = client.get("/users/me")
        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Not authenticated"}
        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    @needs_py310
    def test_token(client: TestClient):
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.3K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_security/test_tutorial006_an.py

        assert response.status_code == 401, response.text
        assert response.headers["WWW-Authenticate"] == "Basic"
    
    
    def test_security_http_basic_invalid_credentials():
        response = client.get(
            "/users/me", headers={"Authorization": "Basic notabase64token"}
        )
        assert response.status_code == 401, response.text
        assert response.headers["WWW-Authenticate"] == "Basic"
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.3K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_security/test_tutorial001.py

    from fastapi.testclient import TestClient
    
    from docs_src.security.tutorial001 import app
    
    client = TestClient(app)
    
    
    def test_no_token():
        response = client.get("/items")
        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Not authenticated"}
        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    def test_token():
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1.9K bytes
    - Viewed (0)
  9. tests/test_security_http_basic_realm_description.py

        assert response.status_code == 401, response.text
        assert response.headers["WWW-Authenticate"] == 'Basic realm="simple"'
    
    
    def test_security_http_basic_invalid_credentials():
        response = client.get(
            "/users/me", headers={"Authorization": "Basic notabase64token"}
        )
        assert response.status_code == 401, response.text
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/internal/authenticator/JavaNetAuthenticatorTest.kt

        val request =
          Request.Builder()
            .url("https://server/robots.txt")
            .build()
        val response =
          Response.Builder()
            .request(request)
            .code(401)
            .header("WWW-Authenticate", "Basic realm=\"User Visible Realm\"")
            .protocol(HTTP_2)
            .message("Unauthorized")
            .build()
        val authRequest = authenticator.authenticate(route, response)
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.7K bytes
    - Viewed (0)
Back to top