You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
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
|
|
|