We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a5c495 commit 3df174dCopy full SHA for 3df174d
README.md
@@ -49,6 +49,14 @@ class AuthService:
49
def __init__(self, jwt_service: JWTService) -> None:
50
self.jwt_service = jwt_service
51
52
+ async def sign_in(self, username: str, password: str) -> t.Dict:
53
+ user = await self.user_service.find_one(username)
54
+ if user.password != credentials.password:
55
+ raise HTTPException(status_code=status.HTTP_403_FORBIDDEN)
56
+
57
+ return {
58
+ 'access_token': await self.jwt_service.sign_async(user.dict())
59
+ }
60
```
61
62
## JWTModule Setup
0 commit comments