Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 25 for Alice (0.14 sec)

  1. tests/test_tutorial/test_security/test_tutorial005_py39.py

        assert response.headers["WWW-Authenticate"] == 'Bearer scope="me"'
    
    
    @needs_py39
    def test_token_inactive_user(client: TestClient):
        access_token = get_access_token(
            username="alice", password="secretalice", scope="me", client=client
        )
        response = client.get(
            "/users/me", headers={"Authorization": f"Bearer {access_token}"}
        )
        assert response.status_code == 400, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.3K bytes
    - Viewed (0)
  2. docs/zh/docs/tutorial/security/simple-oauth2.md

    点击小锁图标,注销后,再执行同样的操作,则会得到 HTTP 401 错误:
    
    ```JSON
    {
      "detail": "Not authenticated"
    }
    ```
    
    ### 未激活用户
    
    测试未激活用户,输入以下信息,进行身份验证:
    
    用户名:`alice`
    
    密码:`secret2`
    
    然后,执行 `/users/me` 路径的 `GET` 操作。
    
    显示下列**未激活用户**错误信息:
    
    ```JSON
    {
      "detail": "Inactive user"
    }
    ```
    
    ## 小结
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.8K bytes
    - Viewed (0)
  3. docs/em/docs/tutorial/security/simple-oauth2.md

    🚥 👆 🖊 🔒 ℹ & ⏏, & ⤴️ 🔄 🎏 🛠️ 🔄, 👆 🔜 🤚 🇺🇸🔍 4️⃣0️⃣1️⃣ ❌:
    
    ```JSON
    {
      "detail": "Not authenticated"
    }
    ```
    
    ### 🔕 👩‍💻
    
    🔜 🔄 ⏮️ 🔕 👩‍💻, 🔓 ⏮️:
    
    👩‍💻: `alice`
    
    🔐: `secret2`
    
    & 🔄 ⚙️ 🛠️ `GET` ⏮️ ➡ `/users/me`.
    
    👆 🔜 🤚 "🔕 👩‍💻" ❌, 💖:
    
    ```JSON
    {
      "detail": "Inactive user"
    }
    ```
    
    ## 🌃
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_security/test_tutorial003_an.py

        assert response.json() == {"detail": "Not authenticated"}
        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    def test_inactive_user():
        response = client.get("/users/me", headers={"Authorization": "Bearer alice"})
        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "Inactive user"}
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 8K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_security/test_tutorial003_an_py310.py

        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    @needs_py310
    def test_inactive_user(client: TestClient):
        response = client.get("/users/me", headers={"Authorization": "Bearer alice"})
        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "Inactive user"}
    
    
    @needs_py310
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
    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. tests/test_tutorial/test_security/test_tutorial003_py310.py

        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    @needs_py310
    def test_inactive_user(client: TestClient):
        response = client.get("/users/me", headers={"Authorization": "Bearer alice"})
        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "Inactive user"}
    
    
    @needs_py310
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
    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)
  7. tests/test_tutorial/test_security/test_tutorial003.py

        assert response.json() == {"detail": "Not authenticated"}
        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    def test_inactive_user():
        response = client.get("/users/me", headers={"Authorization": "Bearer alice"})
        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "Inactive user"}
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
    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. tests/test_tutorial/test_security/test_tutorial003_an_py39.py

        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    @needs_py39
    def test_inactive_user(client: TestClient):
        response = client.get("/users/me", headers={"Authorization": "Bearer alice"})
        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "Inactive user"}
    
    
    @needs_py39
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
    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)
  9. tests/test_tutorial/test_security/test_tutorial005.py

        assert response.headers["WWW-Authenticate"] == 'Bearer scope="me"'
    
    
    def test_token_inactive_user():
        access_token = get_access_token(
            username="alice", password="secretalice", scope="me"
        )
        response = client.get(
            "/users/me", headers={"Authorization": f"Bearer {access_token}"}
        )
        assert response.status_code == 400, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_security/test_tutorial005_an_py39.py

        assert response.headers["WWW-Authenticate"] == 'Bearer scope="me"'
    
    
    @needs_py39
    def test_token_inactive_user(client: TestClient):
        access_token = get_access_token(
            username="alice", password="secretalice", scope="me", client=client
        )
        response = client.get(
            "/users/me", headers={"Authorization": f"Bearer {access_token}"}
        )
        assert response.status_code == 400, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.3K bytes
    - Viewed (0)
Back to top