Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for Authentication (0.21 sec)

  1. fastapi/security/http.py

                    This is useful when you want to have optional authentication.
    
                    It is also useful when you want to have authentication that can be
                    provided in one of multiple optional ways (for example, in HTTP Basic
                    authentication or in an HTTP Bearer token).
                    """
                ),
            ] = True,
        ):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Apr 19 15:29:38 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  2. fastapi/security/oauth2.py

                    be `None`.
    
                    This is useful when you want to have optional authentication.
    
                    It is also useful when you want to have authentication that can be
                    provided in one of multiple optional ways (for example, with OAuth2
                    or in a cookie).
                    """
                ),
            ] = True,
        ):
            self.model = OAuth2Model(
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 21.1K bytes
    - Viewed (1)
  3. tests/test_security_http_bearer_description.py

        response = client.get("/users/me", headers={"Authorization": "Basic notreally"})
        assert response.status_code == 403, response.text
        assert response.json() == {"detail": "Invalid authentication credentials"}
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.2K bytes
    - Viewed (0)
  4. tests/test_security_http_digest_description.py

        response = client.get(
            "/users/me", headers={"Authorization": "Other invalidauthorization"}
        )
        assert response.status_code == 403, response.text
        assert response.json() == {"detail": "Invalid authentication credentials"}
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.2K bytes
    - Viewed (0)
  5. docs_src/security/tutorial003_an_py39.py

        user = fake_decode_token(token)
        if not user:
            raise HTTPException(
                status_code=status.HTTP_401_UNAUTHORIZED,
                detail="Invalid authentication credentials",
                headers={"WWW-Authenticate": "Bearer"},
            )
        return user
    
    
    async def get_current_active_user(
        current_user: Annotated[User, Depends(get_current_user)],
    ):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_security/test_tutorial006_an.py

        )
        assert response.status_code == 401, response.text
        assert response.headers["WWW-Authenticate"] == "Basic"
        assert response.json() == {"detail": "Invalid authentication credentials"}
    
    
    def test_security_http_basic_non_basic_credentials():
        payload = b64encode(b"johnsecret").decode("ascii")
        auth_header = f"Basic {payload}"
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.3K bytes
    - Viewed (0)
  7. tests/test_security_http_basic_realm_description.py

        )
        assert response.status_code == 401, response.text
        assert response.headers["WWW-Authenticate"] == 'Basic realm="simple"'
        assert response.json() == {"detail": "Invalid authentication credentials"}
    
    
    def test_security_http_basic_non_basic_credentials():
        payload = b64encode(b"johnsecret").decode("ascii")
        auth_header = f"Basic {payload}"
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  8. tests/test_security_http_bearer.py

        response = client.get("/users/me", headers={"Authorization": "Basic notreally"})
        assert response.status_code == 403, response.text
        assert response.json() == {"detail": "Invalid authentication credentials"}
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2K bytes
    - Viewed (0)
  9. fastapi/security/api_key.py

                    available, instead of erroring out, the dependency result will be
                    `None`.
    
                    This is useful when you want to have optional authentication.
    
                    It is also useful when you want to have authentication that can be
                    provided in one of multiple optional ways (for example, in a query
                    parameter or in an HTTP Bearer token).
                    """
                ),
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 23 22:29:18 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  10. tests/test_security_http_digest.py

        response = client.get(
            "/users/me", headers={"Authorization": "Other invalidauthorization"}
        )
        assert response.status_code == 403, response.text
        assert response.json() == {"detail": "Invalid authentication credentials"}
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2K bytes
    - Viewed (0)
Back to top