15 lines
424 B
Python
15 lines
424 B
Python
from typing import Protocol
|
|
|
|
from api.domain.user.model import UserEmail, UserId
|
|
|
|
|
|
class JwtTokenProcessor(Protocol):
|
|
def generate_token(self, user_id: UserId, user_email: UserEmail) -> str:
|
|
raise NotImplementedError
|
|
|
|
def validate_token(self, token: str) -> tuple[UserId, UserEmail] | None:
|
|
raise NotImplementedError
|
|
|
|
def refresh_token(self, token: str) -> str:
|
|
raise NotImplementedError
|