Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 27 for Account (0.17 sec)

  1. tests/test_security_oauth2_password_bearer_optional.py

        if token is None:
            return {"msg": "Create an account first"}
        return {"token": token}
    
    
    client = TestClient(app)
    
    
    def test_no_token():
        response = client.get("/items")
        assert response.status_code == 200, response.text
        assert response.json() == {"msg": "Create an account first"}
    
    
    def test_token():
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  2. tests/test_security_http_digest_optional.py

    
    @app.get("/users/me")
    def read_current_user(
        credentials: Optional[HTTPAuthorizationCredentials] = Security(security),
    ):
        if credentials is None:
            return {"msg": "Create an account first"}
        return {"scheme": credentials.scheme, "credentials": credentials.credentials}
    
    
    client = TestClient(app)
    
    
    def test_security_http_digest():
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.2K bytes
    - Viewed (0)
  3. tests/test_security_api_key_header_optional.py

        return user
    
    
    @app.get("/users/me")
    def read_current_user(current_user: Optional[User] = Depends(get_current_user)):
        if current_user is None:
            return {"msg": "Create an account first"}
        return current_user
    
    
    client = TestClient(app)
    
    
    def test_security_api_key():
        response = client.get("/users/me", headers={"key": "secret"})
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2K bytes
    - Viewed (0)
  4. tests/test_security_http_bearer_optional.py

        assert response.json() == {"msg": "Create an account first"}
    
    
    def test_security_http_bearer_incorrect_scheme_credentials():
        response = client.get("/users/me", headers={"Authorization": "Basic notreally"})
        assert response.status_code == 200, response.text
        assert response.json() == {"msg": "Create an account first"}
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  5. tests/test_security_oauth2_password_bearer_optional_description.py

        if token is None:
            return {"msg": "Create an account first"}
        return {"token": token}
    
    
    client = TestClient(app)
    
    
    def test_no_token():
        response = client.get("/items")
        assert response.status_code == 200, response.text
        assert response.json() == {"msg": "Create an account first"}
    
    
    def test_token():
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.2K bytes
    - Viewed (0)
  6. .github/workflows/deploy-docs.yml

            id: deploy
            uses: cloudflare/pages-action@v1
            with:
              apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
              accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
              projectName: fastapitiangolo
              directory: './site'
              gitHubToken: ${{ secrets.GITHUB_TOKEN }}
    Others
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Mar 19 01:33:28 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  7. tests/test_security_http_base_optional.py

    
    @app.get("/users/me")
    def read_current_user(
        credentials: Optional[HTTPAuthorizationCredentials] = Security(security),
    ):
        if credentials is None:
            return {"msg": "Create an account first"}
        return {"scheme": credentials.scheme, "credentials": credentials.credentials}
    
    
    client = TestClient(app)
    
    
    def test_security_http_base():
    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)
  8. tests/test_security_api_key_query_optional.py

        return user
    
    
    @app.get("/users/me")
    def read_current_user(current_user: Optional[User] = Depends(get_current_user)):
        if current_user is None:
            return {"msg": "Create an account first"}
        return current_user
    
    
    client = TestClient(app)
    
    
    def test_security_api_key():
        response = client.get("/users/me?key=secret")
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/path-operation-configuration.md

    You can write <a href="https://en.wikipedia.org/wiki/Markdown" class="external-link" target="_blank">Markdown</a> in the docstring, it will be interpreted and displayed correctly (taking into account docstring indentation).
    
    === "Python 3.10+"
    
        ```Python hl_lines="17-25"
        {!> ../../../docs_src/path_operation_configuration/tutorial004_py310.py!}
        ```
    
    === "Python 3.9+"
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 5.5K bytes
    - Viewed (0)
  10. tests/test_security_api_key_cookie_optional.py

        user = User(username=oauth_header)
        return user
    
    
    @app.get("/users/me")
    def read_current_user(current_user: User = Depends(get_current_user)):
        if current_user is None:
            return {"msg": "Create an account first"}
        else:
            return current_user
    
    
    def test_security_api_key():
        client = TestClient(app, cookies={"key": "secret"})
        response = client.get("/users/me")
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.1K bytes
    - Viewed (0)
Back to top