Coverage for kwai/modules/identity/tokens/refresh_token_query.py: 100%
4 statements
« prev ^ index » next coverage.py v7.3.0, created at 2023-09-05 17:55 +0000
« prev ^ index » next coverage.py v7.3.0, created at 2023-09-05 17:55 +0000
1"""Module that defines an interface for querying a refresh token."""
2from abc import abstractmethod
4from kwai.core.domain.repository.query import Query
5from kwai.modules.identity.tokens.token_identifier import TokenIdentifier
8class RefreshTokenQuery(Query):
9 """An interface for querying a refresh token."""
11 @abstractmethod
12 def filter_by_id(self, id_: int) -> "RefreshTokenQuery":
13 """Filter for the given id."""
14 raise NotImplementedError
16 @abstractmethod
17 def filter_by_token_identifier(
18 self, identifier: TokenIdentifier
19 ) -> "RefreshTokenQuery":
20 """Filter for the given token identifier."""
21 raise NotImplementedError