Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for APIKeyQuery (0.22 sec)

  1. docs/en/docs/reference/security/index.md

    You can import them from `fastapi.security`:
    
    ```python
    from fastapi.security import (
        APIKeyCookie,
        APIKeyHeader,
        APIKeyQuery,
        HTTPAuthorizationCredentials,
        HTTPBasic,
        HTTPBasicCredentials,
        HTTPBearer,
        HTTPDigest,
        OAuth2,
        OAuth2AuthorizationCodeBearer,
        OAuth2PasswordBearer,
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  2. tests/test_security_api_key_query_description.py

    from fastapi import Depends, FastAPI, Security
    from fastapi.security import APIKeyQuery
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    app = FastAPI()
    
    api_key = APIKeyQuery(name="key", description="API Key Query")
    
    
    class User(BaseModel):
        username: str
    
    
    def get_current_user(oauth_header: str = Security(api_key)):
        user = User(username=oauth_header)
        return user
    
    
    @app.get("/users/me")
    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. tests/test_security_api_key_query_optional.py

    from typing import Optional
    
    from fastapi import Depends, FastAPI, Security
    from fastapi.security import APIKeyQuery
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    app = FastAPI()
    
    api_key = APIKeyQuery(name="key", auto_error=False)
    
    
    class User(BaseModel):
        username: str
    
    
    def get_current_user(oauth_header: Optional[str] = Security(api_key)):
        if oauth_header is None:
            return None
    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. fastapi/security/__init__.py

    from .api_key import APIKeyCookie as APIKeyCookie
    from .api_key import APIKeyHeader as APIKeyHeader
    from .api_key import APIKeyQuery as APIKeyQuery
    from .http import HTTPAuthorizationCredentials as HTTPAuthorizationCredentials
    from .http import HTTPBasic as HTTPBasic
    from .http import HTTPBasicCredentials as HTTPBasicCredentials
    from .http import HTTPBearer as HTTPBearer
    from .http import HTTPDigest as HTTPDigest
    from .oauth2 import OAuth2 as OAuth2
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sun Dec 20 18:50:00 GMT 2020
    - 881 bytes
    - Viewed (0)
  5. tests/test_security_api_key_query.py

    from fastapi import Depends, FastAPI, Security
    from fastapi.security import APIKeyQuery
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    app = FastAPI()
    
    api_key = APIKeyQuery(name="key")
    
    
    class User(BaseModel):
        username: str
    
    
    def get_current_user(oauth_header: str = Security(api_key)):
        user = User(username=oauth_header)
        return user
    
    
    @app.get("/users/me")
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1.8K bytes
    - Viewed (0)
  6. docs/de/docs/reference/security/index.md

    Sie können sie von `fastapi.security` importieren:
    
    ```python
    from fastapi.security import (
        APIKeyCookie,
        APIKeyHeader,
        APIKeyQuery,
        HTTPAuthorizationCredentials,
        HTTPBasic,
        HTTPBasicCredentials,
        HTTPBearer,
        HTTPDigest,
        OAuth2,
        OAuth2AuthorizationCodeBearer,
        OAuth2PasswordBearer,
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:15:05 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  7. fastapi/security/api_key.py

        The dependency result will be a string containing the key value.
    
        ## Example
    
        ```python
        from fastapi import Depends, FastAPI
        from fastapi.security import APIKeyQuery
    
        app = FastAPI()
    
        query_scheme = APIKeyQuery(name="api_key")
    
    
        @app.get("/items/")
        async def read_items(api_key: str = Depends(query_scheme)):
            return {"api_key": api_key}
        ```
        """
    
    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)
  8. docs/en/docs/release-notes.md

    * ✨ Add `description` parameter to all the security scheme classes, e.g. `APIKeyQuery(name="key", description="A very cool API key")`. PR [#1757](https://github.com/tiangolo/fastapi/pull/1757) by [@hylkepostma](https://github.com/hylkepostma).
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Apr 19 19:30:49 GMT 2024
    - 384.6K bytes
    - Viewed (1)
Back to top