Skip to content

jwt_handler

JWT token creation and verification using PyJWT.

JwtTokenHandler

JwtTokenHandler(
    secret_key: str, algorithm: str = "HS256", expiration_minutes: int = 1440
)

Concrete implementation of JwtTokenPort using PyJWT.

create_access_token

create_access_token(user_id: UUID) -> str

Create a JWT access token for the given user ID.

decode_access_token

decode_access_token(token: str) -> UUID

Decode a JWT access token and return the user ID.