working on manual logout: block access token
This commit is contained in:
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user