INNER CODE UNIT · Python
CustomClaim
tokusumi/fastapi-cloudauth · fastapi_cloudauth/base.py:136
class CustomClaim(BaseModel):
sub: str
@app.get("/")
def api(user: CustomClaim = Depends(auth.claim(CustomClaim))):
return CustomClaim
```
"""
clone = self._clone()
clone.user_info = schema
return clone
async def call(
self, http_auth: HTTPAuthorizationCredentials
) -> Optional[Union[BaseModel, Dict[str, Any]]]:
"""Get current user and verification with ID-token Shortcut.
Use as (`Auth` is this subclass, `auth` is `Auth` instanse and `app` is fastapi.FastAPI instanse):
```