INNER CODE UNIT · Python
__init__
dorinclisu/fastapi-auth0 · src/fastapi_auth0/auth.py:23
def __init__(self, detail: str, **kwargs):
"""Returns HTTP 401"""
super().__init__(401, detail, **kwargs)
class Auth0UnauthorizedException(HTTPException):
def __init__(self, detail: str, **kwargs):
"""Returns HTTP 403"""
super().__init__(403, detail, **kwargs)
class HTTPAuth0Error(BaseModel):
detail: str
unauthenticated_response: Dict = {401: {'model': HTTPAuth0Error}}
unauthorized_response: Dict = {403: {'model': HTTPAuth0Error}}
security_responses: Dict = {**unauthenticated_response, **unauthorized_response}
class Auth0User(BaseModel):