core: fix token expiration not being updated upon key rotation
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
9c31ea1aa6
commit
5a7508d2e0
|
@ -438,6 +438,7 @@ class Token(ManagedModel, ExpiringModel):
|
||||||
from authentik.events.models import Event, EventAction
|
from authentik.events.models import Event, EventAction
|
||||||
|
|
||||||
self.key = default_token_key()
|
self.key = default_token_key()
|
||||||
|
self.expires = default_token_duration()
|
||||||
self.save(*args, **kwargs)
|
self.save(*args, **kwargs)
|
||||||
Event.new(
|
Event.new(
|
||||||
action=EventAction.SECRET_ROTATE,
|
action=EventAction.SECRET_ROTATE,
|
||||||
|
|
Reference in New Issue