(subject: str | Any, expires_delta: timedelta)
| 59 | |
| 60 | |
| 61 | def create_access_token(subject: str | Any, expires_delta: timedelta) -> str: |
| 62 | expire = datetime.now(timezone.utc) + expires_delta |
| 63 | to_encode = {"exp": expire, "sub": str(subject)} |
| 64 | encoded_jwt = jwt.encode(to_encode, settings.SECRET_KEY, algorithm=ALGORITHM) |
| 65 | return encoded_jwt |
| 66 | |
| 67 | |
| 68 | def get_password_hash(password: str) -> str: |
no outgoing calls