Skip to content

Commit

Permalink
Fix ADFS 4.0 incompatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
juyrjola committed Jun 18, 2018
1 parent 2edb0ef commit 96fe16a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions auth_backends/adfs/base.py
Original file line number Diff line number Diff line change
@@ -45,6 +45,15 @@ def auth_params(self, state=None):
params['resource'] = self.resource
return params

def auth_complete_params(self, state=None):
# ADFS 4.0 has become more sensitive about the client_secret parameter
# being there if no client secret has been set, so remove it from
# params if a secret has not been configured.
params = super().auth_complete_params(state)
if not self.setting('SECRET') and 'client_secret' in params:
del params['client_secret']
return params

def extra_data(self, user, uid, response, details=None, *args, **kwargs):
"""Return data to store in the extra_data field"""
extra_data = super().extra_data(user, uid, response, details, *args, **kwargs)

0 comments on commit 96fe16a

Please sign in to comment.