mirror of
				https://github.com/fastapi-users/fastapi-users.git
				synced 2025-10-31 17:38:30 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			325 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			325 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| from datetime import datetime
 | |
| from typing import Protocol, TypeVar
 | |
| 
 | |
| from fastapi_users import models
 | |
| 
 | |
| 
 | |
| class AccessTokenProtocol(Protocol[models.ID]):
 | |
|     """Access token protocol that ORM model should follow."""
 | |
| 
 | |
|     token: str
 | |
|     user_id: models.ID
 | |
|     created_at: datetime
 | |
| 
 | |
| 
 | |
| AP = TypeVar("AP", bound=AccessTokenProtocol)
 | 
