first commit
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import jwt
|
||||
|
||||
from app.schemas.login import JWTPayload
|
||||
from app.settings.config import settings
|
||||
|
||||
|
||||
def create_access_token(*, data: JWTPayload):
|
||||
payload = data.model_dump().copy()
|
||||
encoded_jwt = jwt.encode(payload, settings.SECRET_KEY, algorithm=settings.JWT_ALGORITHM)
|
||||
return encoded_jwt
|
||||
Reference in New Issue
Block a user