Skip to content

Commit 60f7505

Browse files
committed
chore: refactor idp_hinting - closes #302
1 parent 161d82d commit 60f7505

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

djangosaml2/views.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@ def load_sso_kwargs_authn_context(self, sso_kwargs):
181181
def load_sso_kwargs(self, sso_kwargs):
182182
""" Inherit me if you want to put your desidered things in sso_kwargs """
183183

184+
def add_idp_hinting(self, http_response):
185+
return add_idp_hinting(self.request, http_response) or http_response
186+
184187
def get(self, request, *args, **kwargs):
185188
logger.debug('Login process started')
186189
next_path = self.get_next_path(request)
@@ -388,7 +391,7 @@ def get(self, request, *args, **kwargs):
388391
)
389392

390393
# idp hinting support, add idphint url parameter if present in this request
391-
response = add_idp_hinting(request, http_response) or http_response
394+
response = self.add_idp_hinting(http_response) or http_response
392395
return response
393396

394397

0 commit comments

Comments
 (0)