MCPcopy Index your code
hub / github.com/fastapi-users/fastapi-users / verify

Function verify

fastapi_users/router/verify.py:64–81  ·  view source on GitHub ↗
(
        request: Request,
        token: str = Body(..., embed=True),
        user_manager: BaseUserManager[models.UP, models.ID] = Depends(get_user_manager),
    )

Source from the content-addressed store, hash-verified

62 },
63 )
64 async def verify(
65 request: Request,
66 token: str = Body(..., embed=True),
67 user_manager: BaseUserManager[models.UP, models.ID] = Depends(get_user_manager),
68 ):
69 try:
70 user = await user_manager.verify(token, request)
71 return user_schema.model_validate(user)
72 except (exceptions.InvalidVerifyToken, exceptions.UserNotExists):
73 raise HTTPException(
74 status_code=status.HTTP_400_BAD_REQUEST,
75 detail=ErrorCode.VERIFY_USER_BAD_TOKEN,
76 )
77 except exceptions.UserAlreadyVerified:
78 raise HTTPException(
79 status_code=status.HTTP_400_BAD_REQUEST,
80 detail=ErrorCode.VERIFY_USER_ALREADY_VERIFIED,
81 )
82
83 return router

Callers

nothing calls this directly

Calls 1

verifyMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…