Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for read_with_oauth2_scheme (0.1 sec)

  1. tests/test_security_oauth2_authorization_code_bearer_scopes_openapi.py

    
    @app.get("/")
    async def root():
        return {"message": "Hello World"}
    
    
    @app.get(
        "/with-oauth2-scheme",
        dependencies=[Security(oauth2_scheme, scopes=["read", "write"])],
    )
    async def read_with_oauth2_scheme():
        return {"message": "Admin Access"}
    
    
    @app.get(
        "/with-get-token", dependencies=[Security(get_token, scopes=["read", "write"])]
    )
    async def read_with_get_token():
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 6.6K bytes
    - Viewed (0)
Back to top