Skip to content

Commit ae3745a

Browse files
committed
identity_cache as a variable
1 parent bcdb4cb commit ae3745a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

djangosaml2/views.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,11 +315,12 @@ def post(self, request, attribute_mapping=None, create_unknown_user=None):
315315
create_unknown_user = create_unknown_user or get_custom_setting('SAML_CREATE_UNKNOWN_USER', True)
316316
conf = self.get_sp_config(request)
317317

318-
client = Saml2Client(conf, identity_cache=IdentityCache(request.saml_session))
318+
identity_cache = IdentityCache(request.saml_session)
319+
client = Saml2Client(conf, identity_cache=identity_cache)
319320
oq_cache = OutstandingQueriesCache(request.saml_session)
320321
oq_cache.sync()
321322
outstanding_queries = oq_cache.outstanding_queries()
322-
323+
323324
_exception = None
324325
try:
325326
response = client.parse_authn_request_response(request.POST['SAMLResponse'],

0 commit comments

Comments
 (0)