Skip to content

Commit

Permalink
Request parameter + max_age parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
juanifioren committed Dec 27, 2024
1 parent 61a1ff1 commit cb476c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion oidc_provider/lib/endpoints/authorize.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import logging
from datetime import datetime
from datetime import timedelta
from hashlib import md5
from hashlib import sha256
Expand Down Expand Up @@ -327,7 +328,7 @@ def is_authentication_age_is_greater_than_max_age(self):
auth_time = int(
dateformat.format(self.request.user.last_login or self.request.user.date_joined, "U")
)
max_allowed_time = int(dateformat.format(timezone.now(), "U")) - max_age
max_allowed_time = int(dateformat.format(datetime.now(), "U")) - max_age

return auth_time < max_allowed_time

Expand Down

0 comments on commit cb476c4

Please sign in to comment.