working on manual logout: block access token

This commit is contained in:
2025-06-02 12:18:13 +03:30
parent 8a2b2ce905
commit 0e4076e876
11 changed files with 152 additions and 42 deletions

View File

@@ -144,3 +144,13 @@ class BankAccountInformation(BaseModel):
def save(self, *args, **kwargs):
super(BankAccountInformation, self).save(*args, **kwargs)
class BlacklistedAccessToken(models.Model):
jti = models.CharField(max_length=255, unique=True)
token = models.TextField()
user_id = models.IntegerField()
blacklisted_at = models.DateTimeField(auto_now_add=True)
def __str__(self):
return f"Blacklisted JTI: {self.jti}"