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

1"""Module that defines an interface for querying a refresh token.""" 

2from abc import abstractmethod 

3 

4from kwai.core.domain.repository.query import Query 

5from kwai.modules.identity.tokens.token_identifier import TokenIdentifier 

6 

7 

8class RefreshTokenQuery(Query): 

9 """An interface for querying a refresh token.""" 

10 

11 @abstractmethod 

12 def filter_by_id(self, id_: int) -> "RefreshTokenQuery": 

13 """Filter for the given id.""" 

14 raise NotImplementedError 

15 

16 @abstractmethod 

17 def filter_by_token_identifier( 

18 self, identifier: TokenIdentifier 

19 ) -> "RefreshTokenQuery": 

20 """Filter for the given token identifier.""" 

21 raise NotImplementedError