Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 51 for authentication (0.36 sec)

  1. docs/en/data/external_links.yml

      - author: Nils de Bruin
        author_link: https://medium.com/@nilsdebruin
        link: https://medium.com/data-rebels/fastapi-authentication-revisited-enabling-api-key-authentication-122dc5975680
        title: 'FastAPI authentication revisited: Enabling API key authentication'
      - author: Nick Cortale
        author_link: https://nickc1.github.io/
        link: https://nickc1.github.io/api,/scikit-learn/2019/01/10/scikit-fastapi.html
    Others
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 21 20:57:27 GMT 2024
    - 21.3K bytes
    - Viewed (2)
  2. docs/en/docs/tutorial/security/index.md

        * A cookie.
    * `http`: standard HTTP authentication systems, including:
        * `bearer`: a header `Authorization` with a value of `Bearer ` plus a token. This is inherited from OAuth2.
        * HTTP Basic authentication.
        * HTTP Digest, etc.
    * `oauth2`: all the OAuth2 ways to handle security (called "flows").
        * Several of these flows are appropriate for building an OAuth 2.0 authentication provider (like Google, Facebook, Twitter, GitHub, etc):
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Jun 24 14:47:15 GMT 2023
    - 4.3K bytes
    - Viewed (0)
  3. fastapi/security/open_id_connect_url.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 OpenID
                    Connect or in a cookie).
                    """
                ),
            ] = True,
        ):
            self.model = OpenIdConnectModel(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  4. docs/en/docs/reference/dependencies.md

    You can import it directly from `fastapi`:
    
    ```python
    from fastapi import Depends
    ```
    
    ::: fastapi.Depends
    
    ## `Security()`
    
    For many scenarios, you can handle security (authorization, authentication, etc.) with dependencies, using `Depends()`.
    
    But when you want to also declare OAuth2 scopes, you can use `Security()` instead of `Depends()`.
    
    You can import `Security()` directly from `fastapi`:
    
    ```python
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 671 bytes
    - Viewed (0)
  5. docs/en/docs/reference/security/index.md

    ::: fastapi.security.APIKeyHeader
    
    ::: fastapi.security.APIKeyQuery
    
    ## HTTP Authentication Schemes
    
    ::: fastapi.security.HTTPBasic
    
    ::: fastapi.security.HTTPBearer
    
    ::: fastapi.security.HTTPDigest
    
    ## HTTP Credentials
    
    ::: fastapi.security.HTTPAuthorizationCredentials
    
    ::: fastapi.security.HTTPBasicCredentials
    
    ## OAuth2 Authentication
    
    ::: fastapi.security.OAuth2
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  6. 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 Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Apr 19 15:29:38 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_security/test_tutorial006_an_py39.py

        )
        assert response.status_code == 401, response.text
        assert response.headers["WWW-Authenticate"] == "Basic"
        assert response.json() == {"detail": "Invalid authentication credentials"}
    
    
    @needs_py39
    def test_security_http_basic_non_basic_credentials(client: TestClient):
        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.5K bytes
    - Viewed (0)
  8. docs/en/docs/advanced/security/oauth2-scopes.md

    OAuth2 with scopes is the mechanism used by many big authentication providers, like Facebook, Google, GitHub, Microsoft, Twitter, etc. They use it to provide specific permissions to users and applications.
    
    Every time you "log in with" Facebook, Google, GitHub, Microsoft, Twitter, that application is using OAuth2 with scopes.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 21:21:35 GMT 2024
    - 20.5K bytes
    - Viewed (0)
  9. docs_src/security/tutorial003_an.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 Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  10. docs_src/security/tutorial003_an_py310.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 Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 2.5K bytes
    - Viewed (0)
Back to top