Made the provider sync the client DB to disc everytime a new client is registered.

This commit is contained in:
Roland Hedberg 2014-11-28 11:49:09 +01:00
parent 175caff64d
commit 1f932e0b45
1 changed files with 7 additions and 5 deletions

View File

@ -409,11 +409,10 @@ class Provider(AProvider):
try:
if len(self.authn_broker) == 1:
return self.authn_broker[0]
else:
if "acr_values" in areq:
if not comparision_type:
comparision_type = "exact"
return self.authn_broker[0]
elif "acr_values" in areq:
if not comparision_type:
comparision_type = "exact"
if not isinstance(areq["acr_values"], list):
areq["acr_values"] = [areq["acr_values"]]
@ -425,6 +424,8 @@ class Provider(AProvider):
if res:
#Return the best guess by pick.
return res[0]
else: # same as any
return self.authn_broker[0]
except KeyError as exc:
logger.debug(
"An error occured while picking the authN broker: %s" % str(
@ -1359,6 +1360,7 @@ class Provider(AProvider):
_keyjar[client_id] = [_kc]
self.cdb[client_id] = _cinfo
self.cdb.sync()
_log_info("Client info: %s" % _cinfo)
logger.debug("registration_response: %s" % response.to_dict())