Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 1 of 1 for HTTPBearer403 (0.65 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. docs_src/authentication_error_status_code/tutorial001_an_py310.py

    app = FastAPI()
    
    
    class HTTPBearer403(HTTPBearer):
        def make_not_authenticated_error(self) -> HTTPException:
            return HTTPException(
                status_code=status.HTTP_403_FORBIDDEN, detail="Not authenticated"
            )
    
    
    CredentialsDep = Annotated[HTTPAuthorizationCredentials, Depends(HTTPBearer403())]
    
    
    @app.get("/me")
    def read_me(credentials: CredentialsDep):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 618 bytes
    - Click Count (0)
Back to Top