Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for OAuth2AuthorizationCodeBearer (0.3 sec)

  1. tests/test_security_oauth2_authorization_code_bearer_description.py

    from typing import Optional
    
    from fastapi import FastAPI, Security
    from fastapi.security import OAuth2AuthorizationCodeBearer
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    oauth2_scheme = OAuth2AuthorizationCodeBearer(
        authorizationUrl="authorize",
        tokenUrl="token",
        description="OAuth2 Code Bearer",
        auto_error=True,
    )
    
    
    @app.get("/items/")
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.4K bytes
    - Viewed (0)
  2. docs/en/docs/reference/security/index.md

        APIKeyCookie,
        APIKeyHeader,
        APIKeyQuery,
        HTTPAuthorizationCredentials,
        HTTPBasic,
        HTTPBasicCredentials,
        HTTPBearer,
        HTTPDigest,
        OAuth2,
        OAuth2AuthorizationCodeBearer,
        OAuth2PasswordBearer,
        OAuth2PasswordRequestForm,
        OAuth2PasswordRequestFormStrict,
        OpenIdConnect,
        SecurityScopes,
    )
    ```
    
    ## API Key Security Schemes
    
    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)
  3. tests/test_security_oauth2_authorization_code_bearer.py

    from typing import Optional
    
    from fastapi import FastAPI, Security
    from fastapi.security import OAuth2AuthorizationCodeBearer
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    oauth2_scheme = OAuth2AuthorizationCodeBearer(
        authorizationUrl="authorize", tokenUrl="token", auto_error=True
    )
    
    
    @app.get("/items/")
    async def read_items(token: Optional[str] = Security(oauth2_scheme)):
        return {"token": token}
    
    
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.3K bytes
    - Viewed (0)
  4. fastapi/security/__init__.py

    from .http import HTTPBasicCredentials as HTTPBasicCredentials
    from .http import HTTPBearer as HTTPBearer
    from .http import HTTPDigest as HTTPDigest
    from .oauth2 import OAuth2 as OAuth2
    from .oauth2 import OAuth2AuthorizationCodeBearer as OAuth2AuthorizationCodeBearer
    from .oauth2 import OAuth2PasswordBearer as OAuth2PasswordBearer
    from .oauth2 import OAuth2PasswordRequestForm as OAuth2PasswordRequestForm
    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. docs/de/docs/reference/security/index.md

        APIKeyCookie,
        APIKeyHeader,
        APIKeyQuery,
        HTTPAuthorizationCredentials,
        HTTPBasic,
        HTTPBasicCredentials,
        HTTPBearer,
        HTTPDigest,
        OAuth2,
        OAuth2AuthorizationCodeBearer,
        OAuth2PasswordBearer,
        OAuth2PasswordRequestForm,
        OAuth2PasswordRequestFormStrict,
        OpenIdConnect,
        SecurityScopes,
    )
    ```
    
    ## API-Schlüssel-Sicherheitsschemas
    
    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)
  6. fastapi/security/oauth2.py

                        headers={"WWW-Authenticate": "Bearer"},
                    )
                else:
                    return None
            return param
    
    
    class OAuth2AuthorizationCodeBearer(OAuth2):
        """
        OAuth2 flow for authentication using a bearer token obtained with an OAuth2 code
        flow. An instance of it would be used as a dependency.
        """
    
        def __init__(
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 21.1K bytes
    - Viewed (1)
  7. docs/en/docs/release-notes.md

    * Add link to Chinese article in [External Links](https://fastapi.tiangolo.com/external-links/). PR [810](https://github.com/tiangolo/fastapi/pull/810) by [@wxq0309](https://github.com/wxq0309).
    * Implement `OAuth2AuthorizationCodeBearer` class. PR [#797](https://github.com/tiangolo/fastapi/pull/797) by [@kuwv](https://github.com/kuwv).
    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