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
1524efcf51
commit
d9ece98bbc
|
@ -426,6 +426,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 a new issue