Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 24 for provides (0.16 sec)

  1. fastapi/param_functions.py

            Doc(
                """
                OpenAPI-specific examples.
    
                It will be added to the generated OpenAPI (e.g. visible at `/docs`).
    
                Swagger UI (that provides the `/docs` interface) has better support for the
                OpenAPI-specific examples than the JSON Schema `examples`, that's the main
                use case for this.
    
                Read more about it in the
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 62.5K bytes
    - Viewed (0)
  2. docs/sts/client_grants/sts_element.py

    _STS_NS = {'sts': 'https://sts.amazonaws.com/doc/2011-06-15/'}
    
    
    class STSElement(object):
        """STS aware XML parsing class. Wraps a root element name and
        cElementTree.Element instance. Provides STS namespace aware parsing
        functions.
    
        """
    
        def __init__(self, root_name, element):
            self.root_name = root_name
            self.element = element
    
        @classmethod
    Python
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 23 18:58:53 GMT 2021
    - 2.5K bytes
    - Viewed (0)
  3. fastapi/security/http.py

                    """
                ),
            ] = None,
            auto_error: Annotated[
                bool,
                Doc(
                    """
                    By default, if the HTTP Basic authentication is not provided (a
                    header), `HTTPBasic` will automatically cancel the request and send the
                    client an error.
    
                    If `auto_error` is set to `False`, when the HTTP Basic authentication
    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)
  4. fastapi/security/oauth2.py

                    """
                ),
            ] = None,
            auto_error: Annotated[
                bool,
                Doc(
                    """
                    By default, if no HTTP Authorization header is provided, required for
                    OAuth2 authentication, it will automatically cancel the request and
                    send the client an error.
    
    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)
  5. docs_src/bigger_applications/app_an_py39/dependencies.py

            raise HTTPException(status_code=400, detail="X-Token header invalid")
    
    
    async def get_query_token(token: str):
        if token != "jessica":
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 409 bytes
    - Viewed (0)
  6. docs_src/security/tutorial003_an_py39.py

        hashed_password: str
    
    
    def get_user(db, username: str):
        if username in db:
            user_dict = db[username]
            return UserInDB(**user_dict)
    
    
    def fake_decode_token(token):
        # This doesn't provide any security at all
        # Check the next version
        user = get_user(fake_users_db, token)
        return user
    
    
    async def get_current_user(token: Annotated[str, Depends(oauth2_scheme)]):
    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)
  7. tests/test_tutorial/test_bigger_applications/test_main_an.py

    
    def test_users_token_monica_with_no_jessica(client: TestClient):
        response = client.get("/users?token=monica")
        assert response.status_code == 400
        assert response.json() == {"detail": "No Jessica token provided"}
    
    
    def test_items_token_jessica(client: TestClient):
        response = client.get(
            "/items?token=jessica", headers={"X-Token": "fake-super-secret-token"}
        )
        assert response.status_code == 200
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 24.6K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_bigger_applications/test_main_an_py39.py

    @needs_py39
    def test_users_token_monica_with_no_jessica(client: TestClient):
        response = client.get("/users?token=monica")
        assert response.status_code == 400
        assert response.json() == {"detail": "No Jessica token provided"}
    
    
    @needs_py39
    def test_items_token_jessica(client: TestClient):
        response = client.get(
            "/items?token=jessica", headers={"X-Token": "fake-super-secret-token"}
        )
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 24.9K bytes
    - Viewed (0)
  9. fastapi/security/api_key.py

        """
        API key authentication using a query parameter.
    
        This defines the name of the query parameter that should be provided in the request
        with the API key and integrates that into the OpenAPI documentation. It extracts
        the key value sent in the query parameter automatically and provides it as the
        dependency result. But it doesn't define how to send that API key to the client.
    
        ## Usage
    
    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. docs/sts/client_grants/__init__.py

                                              )
                if response.status != 200:
                    message = "Credential refresh failed, response: %s"
                    raise CredentialRetrievalError(
                        provider=method,
                        error_msg=message % response.status,
                    )
    
                creds = json.loads(response.data)
    
                query = {}
                query['Action'] = 'AssumeRoleWithClientGrants'
    Python
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 23 18:58:53 GMT 2021
    - 4.6K bytes
    - Viewed (1)
Back to top