Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 72 for Credentials (0.17 sec)

  1. tests/test_tutorial/test_websockets/test_tutorial002_an.py

                assert data == "Query parameter q is: 3"
                data = websocket.receive_text()
                assert data == f"Message text was: {message}, for item ID: 2"
    
    
    def test_websocket_no_credentials():
        client = TestClient(app)
        with pytest.raises(WebSocketDisconnect):
            with client.websocket_connect("/items/foo/ws"):
                pytest.fail(
                    "did not raise WebSocketDisconnect on __enter__"
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 3.6K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_security/test_tutorial003_an.py

    def test_incorrect_token():
        response = client.get("/users/me", headers={"Authorization": "Bearer nonexistent"})
        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Invalid authentication credentials"}
        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    def test_incorrect_token_type():
        response = client.get(
            "/users/me", headers={"Authorization": "Notexistent testtoken"}
        )
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 8K bytes
    - Viewed (0)
  3. docs/ru/docs/tutorial/cors.md

    * `allow_credentials` - указывает, что куки разрешены в кросс-доменных запросах. По умолчанию равно `False`. Также, `allow_origins` нельзя присвоить `['*']`, если разрешено использование учётных данных. В таком случае должен быть указан список источников.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jun 22 14:29:56 GMT 2023
    - 8.3K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_security/test_tutorial003_an_py310.py

        response = client.get("/users/me", headers={"Authorization": "Bearer nonexistent"})
        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Invalid authentication credentials"}
        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    @needs_py310
    def test_incorrect_token_type(client: TestClient):
        response = client.get(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 8.4K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_security/test_tutorial003_py310.py

        response = client.get("/users/me", headers={"Authorization": "Bearer nonexistent"})
        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Invalid authentication credentials"}
        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    @needs_py310
    def test_incorrect_token_type(client: TestClient):
        response = client.get(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 8.4K bytes
    - Viewed (0)
  6. docs/em/docs/tutorial/cors.md

    * `allow_credentials` - 🎦 👈 🍪 🔜 🐕‍🦺 ✖️-🇨🇳 📨. 🔢 `False`. , `allow_origins` 🚫🔜 ⚒ `['*']` 🎓 ✔, 🇨🇳 🔜 ✔.
    * `expose_headers` - 🎦 🙆 📨 🎚 👈 🔜 ⚒ ♿ 🖥. 🔢 `[]`.
    * `max_age` - ⚒ 🔆 🕰 🥈 🖥 💾 ⚜ 📨. 🔢 `600`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 4.1K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_security/test_tutorial003.py

    def test_incorrect_token():
        response = client.get("/users/me", headers={"Authorization": "Bearer nonexistent"})
        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Invalid authentication credentials"}
        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    def test_incorrect_token_type():
        response = client.get(
            "/users/me", headers={"Authorization": "Notexistent testtoken"}
        )
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 8K bytes
    - Viewed (0)
  8. docs/en/docs/advanced/settings.md

    # Settings and Environment Variables
    
    In many cases your application could need some external settings or configurations, for example secret keys, database credentials, credentials for email services, etc.
    
    Most of these settings are variable (can change), like database URLs. And many could be sensitive, like secrets.
    
    For this reason it's common to provide them in environment variables that are read by the application.
    
    ## Environment Variables
    
    !!! tip
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 15.7K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_security/test_tutorial003_an_py39.py

        response = client.get("/users/me", headers={"Authorization": "Bearer nonexistent"})
        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Invalid authentication credentials"}
        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    @needs_py39
    def test_incorrect_token_type(client: TestClient):
        response = client.get(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 8.4K bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/security/simple-oauth2.md

    Open the interactive docs: <a href="http://127.0.0.1:8000/docs" class="external-link" target="_blank">http://127.0.0.1:8000/docs</a>.
    
    ### Authenticate
    
    Click the "Authorize" button.
    
    Use the credentials:
    
    User: `johndoe`
    
    Password: `secret`
    
    <img src="/img/tutorial/security/image04.png">
    
    After authenticating in the system, you will see it like:
    
    <img src="/img/tutorial/security/image05.png">
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 12.5K bytes
    - Viewed (0)
Back to top