service_man/api/application/protocols/jwt.py

12 lines
289 B
Python

from typing import Protocol
from api.domain.user.model import UserId
class JwtTokenProcessor(Protocol):
def generate_token(self, user_id: UserId) -> str:
raise NotImplementedError
def validate_token(self, token: str) -> UserId | None:
raise NotImplementedError