Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for HTTPBearer403 (0.06 sec)

  1. docs_src/authentication_error_status_code/tutorial001_an_py39.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):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 24 19:03:06 UTC 2025
    - 618 bytes
    - Viewed (0)
  2. tests/test_tutorial/test_authentication_error_status_code/test_tutorial001.py

                                }
                            },
                            "security": [{"HTTPBearer403": []}],
                        }
                    }
                },
                "components": {
                    "securitySchemes": {
                        "HTTPBearer403": {"type": "http", "scheme": "bearer"}
                    }
                },
            }
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 1.9K bytes
    - Viewed (0)
Back to top