Skip to content

Commit

Permalink
♻️ [#4246] Remove session refresh code
Browse files Browse the repository at this point in the history
The DigiD/eHerkenning OIDC callback view(s) should not set any
token refresh parameters, since there is no middleware hooked
up to perform this refresh anyway. In its current form, it is
even conflicting with the admin OIDC refresh settings.
  • Loading branch information
sergei-maertens committed May 6, 2024
1 parent 55792fa commit 78b1860
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions src/digid_eherkenning_oidc_generics/views.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import logging
import time
from typing import Generic, TypeVar, cast

from django.contrib import auth
Expand Down Expand Up @@ -218,17 +217,7 @@ def get(self, request):

def login_success(self):
"""
Overridden to not actually log the user in, since setting the BSN in
the session variables is all that matters
Overridden to not actually log the user in, since setting the BSN/KVK/... in
the session variables is all that matters.
"""

# Figure out when this id_token will expire. This is ignored unless you're
# using the RenewIDToken middleware.
expiration_interval = self.get_settings(
"OIDC_RENEW_ID_TOKEN_EXPIRY_SECONDS", 60 * 15
)
self.request.session["oidc_id_token_expiration"] = (
time.time() + expiration_interval
)

return HttpResponseRedirect(self.success_url)

0 comments on commit 78b1860

Please sign in to comment.