feat(auth): implement JWT TTL and expiration

added access_token_ttl setting
fixed public and private key mismatch while decoding jwt
decode_jwt now returns None on expired tokens instead of raising exc
generate_pair converts sub to string and uses dynamic expiration
This commit is contained in:
2026-07-24 12:59:41 +07:00
parent eb35f2acad
commit 9187fbb970
4 changed files with 18 additions and 7 deletions

View File

@@ -16,6 +16,8 @@ class Settings(BaseSettings):
private_key_fp: str = Field()
public_key_fp: str = Field()
access_token_ttl: int = Field(description="Access token TTL (minutes)")
@computed_field
@property
def db_url(self) -> str: