Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 55 for 403 (0.17 sec)

  1. docs_src/bigger_applications/app/routers/items.py

    
    @router.put(
        "/{item_id}",
        tags=["custom"],
        responses={403: {"description": "Operation forbidden"}},
    )
    async def update_item(item_id: str):
        if item_id != "plumbus":
            raise HTTPException(
                status_code=403, detail="You can only update the item: plumbus"
            )
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sun Nov 29 17:32:18 GMT 2020
    - 1011 bytes
    - Viewed (0)
  2. tests/test_security_http_digest.py

        response = client.get("/users/me")
        assert response.status_code == 403, response.text
        assert response.json() == {"detail": "Not authenticated"}
    
    
    def test_security_http_digest_incorrect_scheme_credentials():
        response = client.get(
            "/users/me", headers={"Authorization": "Other invalidauthorization"}
        )
        assert response.status_code == 403, 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)
  3. docs/de/docs/reference/status.md

    ```
    
    `status` wird direkt von Starlette bereitgestellt.
    
    Es enthält eine Gruppe benannter Konstanten (Variablen) mit ganzzahligen Statuscodes.
    
    Zum Beispiel:
    
    * 200: `status.HTTP_200_OK`
    * 403: `status.HTTP_403_FORBIDDEN`
    * usw.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:17:17 GMT 2024
    - 934 bytes
    - Viewed (0)
  4. docs/en/docs/reference/status.md

    from fastapi import status
    ```
    
    `status` is provided directly by Starlette.
    
    It contains a group of named constants (variables) with integer status codes.
    
    For example:
    
    * 200: `status.HTTP_200_OK`
    * 403: `status.HTTP_403_FORBIDDEN`
    * etc.
    
    It can be convenient to quickly access HTTP (and WebSocket) status codes in your app, using autocompletion for the name without having to remember the integer status codes by memory.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 871 bytes
    - Viewed (0)
  5. docs_src/bigger_applications/app_an/routers/items.py

    
    @router.put(
        "/{item_id}",
        tags=["custom"],
        responses={403: {"description": "Operation forbidden"}},
    )
    async def update_item(item_id: str):
        if item_id != "plumbus":
            raise HTTPException(
                status_code=403, detail="You can only update the item: plumbus"
            )
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 1011 bytes
    - Viewed (0)
  6. fastapi/security/api_key.py

    from fastapi.openapi.models import APIKey, APIKeyIn
    from fastapi.security.base import SecurityBase
    from starlette.exceptions import HTTPException
    from starlette.requests import Request
    from starlette.status import HTTP_403_FORBIDDEN
    from typing_extensions import Annotated, Doc
    
    
    class APIKeyBase(SecurityBase):
        pass
    
    
    class APIKeyQuery(APIKeyBase):
        """
        API key authentication using a query parameter.
    
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  7. fastapi/security/open_id_connect_url.py

    from fastapi.openapi.models import OpenIdConnect as OpenIdConnectModel
    from fastapi.security.base import SecurityBase
    from starlette.exceptions import HTTPException
    from starlette.requests import Request
    from starlette.status import HTTP_403_FORBIDDEN
    from typing_extensions import Annotated, Doc
    
    
    class OpenIdConnect(SecurityBase):
        """
        OpenID Connect authentication class. An instance of it would be used as a
        dependency.
        """
    
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  8. tests/test_security_http_bearer.py

        response = client.get("/users/me")
        assert response.status_code == 403, response.text
        assert response.json() == {"detail": "Not authenticated"}
    
    
    def test_security_http_bearer_incorrect_scheme_credentials():
        response = client.get("/users/me", headers={"Authorization": "Basic notreally"})
        assert response.status_code == 403, response.text
        assert response.json() == {"detail": "Invalid authentication credentials"}
    
    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. buildscripts/verify-healing-with-root-disks.sh

    	for i in $(seq 1 4); do
    		"${MINIO[@]}" --address ":$((start_port + i))" ${args[@]} 2>&1 >"${WORK_DIR}/server$i.log" &
    	done
    
    	# Wait until all nodes return 403
    	for i in $(seq 1 4); do
    		while [ "$(curl -m 1 -s -o /dev/null -w "%{http_code}" http://localhost:$((start_port + i)))" -ne "403" ]; do
    			echo -n "."
    			sleep 1
    		done
    	done
    
    }
    
    # Prepare fake disks with losetup
    function prepare_block_devices() {
    	set -e
    Shell Script
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri May 26 05:07:25 GMT 2023
    - 2.2K bytes
    - Viewed (0)
  10. docs_src/bigger_applications/app_an_py39/routers/items.py

    
    @router.put(
        "/{item_id}",
        tags=["custom"],
        responses={403: {"description": "Operation forbidden"}},
    )
    async def update_item(item_id: str):
        if item_id != "plumbus":
            raise HTTPException(
                status_code=403, detail="You can only update the item: plumbus"
            )
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 1011 bytes
    - Viewed (0)
Back to top